]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Convert properly UTF-8 to UTF-16
authorFrediano Ziglio <frediano.ziglio@citrix.com>
Tue, 7 Aug 2012 09:33:03 +0000 (04:33 -0500)
committerSteve French <smfrench@gmail.com>
Wed, 3 Oct 2012 19:38:17 +0000 (14:38 -0500)
commit5b57b3b87087e5df035e5f18041a4f1b9eb0b7f2
treed3bdd80ec0c360d59442c1997da93af461474fc5
parentf1097971ef0eb00056ef600514d3a25febd3e415
Convert properly UTF-8 to UTF-16

wchar_t is currently 16bit so converting a utf8 encoded characters not
in plane 0 (>= 0x10000) to wchar_t (that is calling char2uni) lead to a
-EINVAL return. This patch detect utf8 in cifs_strtoUTF16 and add special
code calling utf8s_to_utf16s.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/cifs_unicode.c