Thanks mk.  Maybe I was not clear the previous time.

Say if I transferred @#123.txt, (assume @# are some Chinese charcters) through command line (FTP command of the OS) then they were created as @#123.txt.
If I transferred @#124.txt through the Apache it became ??124.txt

but this is the interesting situation...
If I used Apache and tried to get back the file which is there, if I give @#123.txt (the file that was transferred through command line), I get back the error that the file is missing. If I give @#124.txt, though the file name was garbled up it returns the file properly.

I have proper character encoding set that means I can see the names properly for those files transferred through command line FTP.

Did you have to set up setControlEncoding before you called the store or retrieve methods?

Are german umlaute (like äöüÜÖÄ) characters multi byte characters? I have a feeling that GB18030 being multii byte is causing the problem

Thanks
Kumar


From: "Knezevic, Mihael" <[EMAIL PROTECTED]>
Reply-To: "Jakarta Commons Users List" <[email protected]>
To: "Jakarta Commons Users List" <[email protected]>
Subject: RE: [Help] FTP of files with non english file names
Date: Thu, 16 Feb 2006 08:55:09 +0100

but if you can retrieve the file with the right filename, then where is the problem? if you are checking the filenames on the remote machine with a shell then perhaps the shell doesn't support chinese characters?

i use commons-net with filenames which contains german umlaute (like äöüÜÖÄ) and the files are created with the right filenames. if i use the windows command line ftp client it won't show the right filenames, cause it doesn't support non-english characters. if i check on the remote machine in some other way (vnc) the filenames are ok.

i hope this helps.

mk

ps: character encoding in java is a real pain in the ass.

> -----Original Message-----
> From: Muthukumar Arasu [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 16, 2006 5:37 AM
> To: [email protected]
> Subject: [Help] FTP of files with non english file names
>
> I was able to narrow down the problem to storeFile and
> retrieveFile methods
> in FTPClient, where one have to give the remote file name as
> a String. In my
> case they are Chinese characters (GB18030) which gets garbled
> up at the
> target machine. How should I pass such characters to these
> methods. Any help
> would be appreciated.
>
> Thanks
> Kumar
>
> >
> >I wrote a program to use commons-net to transfer files and
> it works well
> >for all files with just english characters in it. When I
> used the program
> >to transfer a file with chinese characters in its name, it
> puts the file in
> >the target machine but totally creates a garabge file name
> at the target
> >machine. (For example if I put [EMAIL PROTECTED] (here ~!@ assume
> are some chinese
> >characters) then in the server it 1shows up something like
> ??123.txt. If i
> >programatically retrive the file as get [EMAIL PROTECTED], then it
> is able to
> >retrieve it back.  I think the API translates the
> characterset into some
> >other characters which it is able to understand on both way
> file transfers.
> >
> >If I use the OS command line FTP to get [EMAIL PROTECTED] then it
> fails, because
> >the file ??123.txt is only present at the target location.
> >
> >Could anyone clarify on how to do file transfers using
> FTPClient with non
> >english character set?
> >
> >Thanks
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to