From: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org>
To: Frediano Ziglio
<frediano.ziglio-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
Cc: "smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
<smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org"
<sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
"jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org"
<samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2] Convert properly UTF-8 to UTF-16
Date: Tue, 09 Oct 2012 10:13:38 +0530 [thread overview]
Message-ID: <5073AB7A.3020103@suse.com> (raw)
In-Reply-To: <7CE799CC0E4DE04B88D5FDF226E18AC2E08D0408E8-aFusIB7tbcLeU4JHVX8hdHnr0TU713UqXqFh9Ls21Oc@public.gmane.org>
On 10/08/2012 01:48 PM, Frediano Ziglio wrote:
> On Wed, 2012-10-03 at 14:49 -0500, Steve French wrote:
>> Merged - but doesn't the reverse also have to be added in cifs_from_utf16? ie
>>
>> utf16s_to_utf8s(uni, ... );
>>
>
> Not strictly necessary, at least to be able to mount shares.
>
>> I am glad that someone added these multiword handling routines into
>> the kernel for FAT - this has been something we have wanted for a long
>> time in cifs (and smb2/smb3). Note the comment in
>> fs/cifs/cifs_unicode.c
>>
>> / * Note that some windows versions actually send multiword UTF-16 characters
>> * instead of straight UTF16-2. The linux nls routines however aren't able to
>> * deal with those characters properly. In the event that we get some of
>> * those characters, they won't be translated properly.
>> */
>> int
>> cifs_from_utf16(char *to, const __le16 *from, int tolen, int fromlen,
>> const struct nls_table *codepage, bool mapchar)
>>
>
> Should not be UCS-2 instead of UTF16-2 ??
>
>>
>> We could really use some nls test cases for cifs/smb2/smb3/nfs4 which
>> basically did various file, directory, symlink create/rename/delete
>> operations with various hard to map characters so we can test copying
>> to and from the server and ensure that we get the name mappings right
>> for these (and don't ever regress). Fortunately smb2/smb3 is only
>> unicode so we don't have to deal with mappings to other codepages from
>> utf8
>>
>
> Do you have some framework/hook to put these tests ?
>
I recently wrote cifstests to primarily provide a basic infrastructure
for adding regression tests for cifs. It's written in python and the
plan to be able to use python or C bindings for python. You might
consider adding tests to it.
https://github.com/sureshjayaram/cifstests
Thanks
Suresh
prev parent reply other threads:[~2012-10-09 4:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 9:33 [PATCH v2] Convert properly UTF-8 to UTF-16 Frediano Ziglio
[not found] ` <7CE799CC0E4DE04B88D5FDF226E18AC2CDFFB08D16-aFusIB7tbcLeU4JHVX8hdHnr0TU713UqXqFh9Ls21Oc@public.gmane.org>
2012-08-07 10:47 ` Jeff Layton
[not found] ` <20120807064752.22e0da81-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2012-08-28 7:28 ` Frediano Ziglio
[not found] ` <7CE799CC0E4DE04B88D5FDF226E18AC2E07634EB82-aFusIB7tbcLeU4JHVX8hdHnr0TU713UqXqFh9Ls21Oc@public.gmane.org>
2012-10-03 14:34 ` Frediano Ziglio
[not found] ` <7CE799CC0E4DE04B88D5FDF226E18AC2E08D0408DA-aFusIB7tbcLeU4JHVX8hdHnr0TU713UqXqFh9Ls21Oc@public.gmane.org>
2012-10-03 19:49 ` Steve French
2012-10-08 8:18 ` Frediano Ziglio
2012-10-08 11:26 ` Jeff Layton
[not found] ` <7CE799CC0E4DE04B88D5FDF226E18AC2E08D0408E8-aFusIB7tbcLeU4JHVX8hdHnr0TU713UqXqFh9Ls21Oc@public.gmane.org>
2012-10-08 14:04 ` Steve French
2012-10-09 4:43 ` Suresh Jayaraman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5073AB7A.3020103@suse.com \
--to=sjayaraman-ibi9rg/b67k@public.gmane.org \
--cc=frediano.ziglio-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org \
--cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
--cc=sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox