[jcifs] Re: Failed to access files on Samba server with path in Chinese

Michael B Allen mba2000 at ioplex.com
Wed Dec 22 04:33:51 GMT 2004


On Wed, 22 Dec 2004 11:57:52 +0800
"joller" <joller at intumit.com> wrote:

> Dear Mike,
> 
>     It works!
>     I can get the content of the file, and list files in a directory with
> Chinese name as well.
>     Is this a bug of JciFS?

Yes. There was a line in the NT_CREATE_ANDX encoder that assumed the path
was encoded in a non-variable width encoding. Apparently Big5 is a variable
width encoding and the filename you were using had some characters that
encoded as variable length.

>     Is it just fixed? That is, do you suggest we use the new jar in place?

Yes. The fix is solid.

>     Or will there be a new stable release in near future that will fix the
> problem?

Yes. I will release the same code as 1.1.6 (with some other very minor
changes that are in the queue).

>     In addition, if the client must specify encoding compatible with the
> server,
>     then it has to know the encoding.
>     Is there any programmatic method to determine the encoding of the
> server?

The System property file.encoding is used to encode path names. I believe we
determined that that was already set to Big5. So you do not need to set the
encoding. Try it.

Mike

> > On Wed, 22 Dec 2004 10:32:26 +0800
> > "joller" wrote:
> >
> > > Dear Mike,
> > >
> > >     Enclosed are the captures.
> >
> > How's this:
> >
> >   http://jcifs.samba.org/src/jcifs-1.1.5c.jar

-- 
Greedo shoots first? Not in my Star Wars.


More information about the jcifs mailing list