[jcifs] Does jcifs samba support I18N/Chinese file name?

Michael B Allen mba2000 at ioplex.com
Thu Mar 23 19:53:55 GMT 2006


On Sat, 18 Mar 2006 13:15:13 -0600
"Mattini, Max" <Max_Mattini at bmc.com> wrote:

> Hi,
> 
>  
> 
> I am trying to access a Chinese encoded file using the JCIFS API. 
> 
>  
> 
> - Both file name and contents are encoded with the GB2312 encoding
> schema. 
> 
> - My Samba server is configured with an English/US locale.
> 
>  
> 
> So far I am not successful to access the file. 
> 
>  
> 
> 1)       Does JCIFS samba support I18N/Chinese file name? 

I think so yes. If the text can be represented using 16bit Unicode then
yes if Unicode is negotiated with the target server. If Unicode is not
negotiated, then it will still work if both JCIFS and the target server
are configured to use the appropriate OEM codeset (e.g. GB2312).

> 
> 2)       Should the Samba server be configured with a Chinese locale?

If Unicode is negotiated it is not necessary unless the files on disk
are already encoded in a Chinese locale. Meaning, if programs running
in a Chinese locale created the files then it will be necessary to set
the Samba codeset to that Chinese locale.

> 3)       Should my URLEncoder.encode/decode specify the Chinese charset
> or UTF-8 as recommended in Javadoc

I'm not sure, but I don't think so. Our URL protocol handler is
designed to accept Unicode strings directly. That is not to spec but
because CIFS uses Unicode a lot we decided to try to skip the URL
encoding//decoding. So far I don't recall anyone complaining about that.

Mike


More information about the jcifs mailing list