]> 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>
Mon, 8 Oct 2012 01:04:53 +0000 (20:04 -0500)
commitfd3ba42c76d3d4b776120c2b24c1791e7bb3deb1
tree1e08474b01069313451fc646e2b4a236029598d5
parentb7a10626c8bc88fd097a8bb4486c89558f89320c
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