Japanese Share Names Wrong Format

Jeremy Allison jra at samba.org
Thu Nov 20 01:19:42 GMT 2003

On Tue, Nov 18, 2003 at 10:45:14AM -0800, Jonny Larson wrote:
> Jeremy Allison wrote:
> >On Thu, Nov 13, 2003 at 04:20:02PM -0800, Jonny Larson wrote:
> >  
> >
> >>Hello:
> >>We're using the Samba client 3.0.0 API to get file server access.  We 
> >>have some Japanese Win2k servers that we test with.  This server has 
> >>some share names that are in Japanese.  When I call cli_RNetShareEnum 
> >>against this server, the names passed to my enum function are in the 
> >>Shift_JIS character set.  This is even though the CAP_UNICODE 
> >>capabilities flag is set after cli_negprot is called.  This causes the 
> >>pull_ascii funtion to mash the names when it converts from CH_DOS to 
> >>CH_UNIX inside of convert_string.
> >>    
> >>
> >
> >Can you give some examples please ? I've been working in this area
> >and I want to ensure all these bugs are fixed for 3.0.1.
> >  
> >
> Not sure what you mean by examples.  I can try to clarify the steps to 
> reproduce this:
> 1. Create a Windows share with a name specified in Shitf_JIS.  Of 
> course, you'll need a Japanese installation of Windows to do this.
> 2. Call cli_RNetShareEnum on this server.
> 3. When the list of shares comes down, c->capabilities has the 
> CAP_UNICODE bit set.  The data stream is NOT Unicode.  Rather, it's in 
> Shift_JIS and there's no way to tell this (not that I could see anyway).
> I got around this problem by using the RPC.  The RPC calls use Unicode.

What do you have set for the "dos charset" parameter on the machine you are
running the client code on ?


More information about the samba-technical mailing list