Thanks I got it working. But since my code could be run in any locale I used the following method given Sun website

setControlEncoding((new OutputStreamWriter(new ByteArrayOutputStream())).getEncoding());

I was trying out the method before, but for some stupid reason I was setting the control encoding just before I transferred the files. Then something stuck me that the control connection is always present during the lifetime and only the data connection is created on the fly. So I moved it to the next line after the constructor and it worked fine.

Thanks Daniel.


Kumar

From: "Daniel F. Savarese" <[EMAIL PROTECTED]>
Reply-To: "Jakarta Commons Users List" <[email protected]>
To: [email protected]
Subject: Re: [Help] FTP of files with non english file names Date: Sat, 18 Feb 2006 00:53:50 -0500



I wrote:
>So the answer was in the javadocs all along.  I keep telling myself not

The javadocs for setControlEncoding actually specifically answer the
exact question:

    /**
     * Sets the character encoding used by the FTP control connection.
     * Some FTP servers require that commands be issued in a non-ASCII
     * encoding like UTF-8 so that filenames with multi-byte character
     * representations (e.g, Big 8) can be specified.
     *
* @param encoding The new character encoding for the control connection.
     */

daniel

-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-| Sleep and The Traveller |-#-#-#-#-#-#-#-
    s a v a r e s e      # In distant lands, I hear the call of my home.
software research # Yet my work is not done. My journey's just begun.
http://www.savarese.com/ #  -- http://www.sleepandthetraveller.com/


---------------------------------------------------------------------
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