Japanese Share Names Wrong Format

Andrew Bartlett abartlet at samba.org
Fri Nov 14 08:07:30 GMT 2003

On Fri, 2003-11-14 at 11:20, 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.
> For files with Japanese names, the Samba API properly passes the names 
> in Unicode.
> We do not have ICONV (or GICONV) support compiled in.  Is this a known 
> problem?  Short of changing the Samba code, I don't know what else to 
> do.  Anyone have any suggestions?

This is actually bug 767 in a different guise.  You should use iconv()
where possible, but going via a DOS charset (as all RAP calls do) is
always suboptimal.

Fell free to annotate that bug.

Andrew Bartlett

Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20031114/0c5af3d8/attachment.bin

More information about the samba-technical mailing list