Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-10 Thread Laurent Blume
On 10/09/13 00:40, Jeremy Allison wrote: Ok, here is a fix for 3.6.x. Can you test this and see if it fixes the problem ? If so, I'll get this fixed in master and back-ported to all releases. Applies, builds, and runs, and the error message disappeared: all good. Thanks! Laurent -- To

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-10 Thread Volker Lendecke
Hi, Jeremy! On Mon, Sep 09, 2013 at 03:40:06PM -0700, Jeremy Allison wrote: Ok, here is a fix for 3.6.x. Can you test this and see if it fixes the problem ? If so, I'll get this fixed in master and back-ported to all releases. Thanks ! Jeremy. diff --git a/source3/smbd/mangle_hash2.c

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-10 Thread Volker Lendecke
On Tue, Sep 10, 2013 at 09:48:57AM -0700, Jeremy Allison wrote: It's an old, old check back from when SJIS and EUC were common multi-byte systems. SJIS especially has the property that the second byte can contain a value 127 as part of the 2-byte char set. So if CH_UNIX is set to a char set

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-10 Thread Jeremy Allison
On Tue, Sep 10, 2013 at 11:43:40AM +0200, Volker Lendecke wrote: Hi, Jeremy! On Mon, Sep 09, 2013 at 03:40:06PM -0700, Jeremy Allison wrote: Ok, here is a fix for 3.6.x. Can you test this and see if it fixes the problem ? If so, I'll get this fixed in master and back-ported to all

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-10 Thread Jeremy Allison
On Tue, Sep 10, 2013 at 07:44:39PM +0200, Volker Lendecke wrote: On Tue, Sep 10, 2013 at 09:48:57AM -0700, Jeremy Allison wrote: It's an old, old check back from when SJIS and EUC were common multi-byte systems. SJIS especially has the property that the second byte can contain a value

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-09 Thread Jeremy Allison
On Fri, Sep 06, 2013 at 05:04:53PM -0700, Jeremy Allison wrote: On Sat, Sep 07, 2013 at 02:02:26AM +0200, Laurent Blume wrote: On 2013-09-06 10:54 PM, Jeremy Allison wrote: Either that or add another debug inside convert_string_internal() to print out the values of srclen and i_len

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-07 Thread Laurent Blume
On 2013-09-07 2:04 AM, Jeremy Allison wrote: Woo hoo ! I think you've found an oold old bug :-). I told you so from the beginning! Years! ;-) Not a critical one though, it seems. I'll take a look at that asap. Thanks ! I'll be happy to get rid of it too! Laurent -- To unsubscribe

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-06 Thread Laurent Blume
On 2013-09-06 10:54 PM, Jeremy Allison wrote: Either that or add another debug inside convert_string_internal() to print out the values of srclen and i_len at various points and try and determine why it's off by one. Well, it was /quite/ further than that. I think I got it this time, in

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-06 Thread Jeremy Allison
On Sat, Sep 07, 2013 at 02:02:26AM +0200, Laurent Blume wrote: On 2013-09-06 10:54 PM, Jeremy Allison wrote: Either that or add another debug inside convert_string_internal() to print out the values of srclen and i_len at various points and try and determine why it's off by one.

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-06 Thread Jeremy Allison
On Fri, Sep 06, 2013 at 09:40:25PM +0200, Laurent Blume wrote: On 2013-09-05 11:34 PM, Jeremy Allison wrote: No, it doesn't make sense. smb_iconv() vectors through pull and push function pointers that do the actual conversion - that's where the errno is coming from. That's why you need

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-06 Thread Laurent Blume
On 2013-09-05 11:34 PM, Jeremy Allison wrote: No, it doesn't make sense. smb_iconv() vectors through pull and push function pointers that do the actual conversion - that's where the errno is coming from. That's why you need debug statements - you know it's going into smb_iconv() but you

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-05 Thread Jeremy Allison
On Thu, Sep 05, 2013 at 10:15:16PM +0200, Laurent Blume wrote: Hello list, I've noticed this problem for a few years now, I think. I see it popped out now and then in discussions. But they always end before a solution is given. So let's try one more time :-) I have plenty of UTF-8

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-05 Thread Laurent Blume
On 2013-09-05 10:35 PM, Jeremy Allison wrote: This is the call to smb_iconv() returning an errno of EINVAL. Firstly, add some debug statements inside smb_iconv_open_ex() to find out if we're using the sys_iconv() function (that calls the system iconv) or the internal UFT8 converters. If

Re: [Samba] Conversion error: Illegal multibyte sequence

2013-09-05 Thread Jeremy Allison
On Thu, Sep 05, 2013 at 11:28:14PM +0200, Laurent Blume wrote: I'm not sure I'm still good at adding printf(DEBUG\n) lines around :-) so I tried my hand with dtrace for a start. Here are some examples of what it returns when looking at smb_iconv() while I opened the directory and listed