Allen, Michael B (RSCH)
Michael_B_Allen at ml.com
Thu May 2 22:38:17 GMT 2002
> -----Original Message-----
> From: Urban Widmark [SMTP:urban at teststation.com]
> On Thu, 2 May 2002, Ali Hasnain Baqri wrote:
> > I am executing smbclient through java.lang.Process.exec(String)
> > I am getting the output through stream from it.
> You are aware of the existance of jCIFS? http://jcifs.samba.org/
Actually jCIFS has a problem with Unicode pathnames at the moment. We (actually I)
did something dumb that causes the pathnames to be URL encoded. You have to URL
encode and decode each path component. I'm actually gearing up to fix this in the next
week or so. I know Japanese doesn't work though because someone else was
complaining about it recently.
> Not forking a new process will be faster and you will do everything within
> Java code.
> > When I list the contents of a directory on Windows containing japanese
> > characters, the output is corrupted.
> > Using InputStreamReader to read the output of smbclient with encoding as
Perhaps you need to use DataInputStream.readUTF? You need to determine what the
output encoding is exactly and read it accordingly. But jCIFS is definately a better
solution (once I fix the URL encoding BS).
More information about the smb-clients