hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reudem...@free.fr
Subject MultipartPostMethod adn UTF-8 parameter content.
Date Tue, 09 Nov 2004 10:16:52 GMT
Hi All,

I am using HTTPClient 3.0a2 and I am trying to mimic the POST of a form to
upload a binary file.
The code I use is below:

MultipartPostMethod mPost = new MultipartPostMethod(addFileToPackageURL);
File f1 = new File(fa.getFilePath() + "\\" + fa.getFileName());

It works fine for all files BUT when the filename contains non basic ASCII chars
(like UTF-8), the received filename is transformed and unknow chars are changed
to question marks ?.

It tried to add  mPost.addRequestHeader("Content-Type", "charset=\"UTF-8\"" );
but it does not change anything.

How should I proceed to allow the submit of a filename like
"note¯¯training¯abc.doc" so that it does not become
"note??training?abc.doc" on the other end of the wire ?

Is this a bug or am I doing something wrong (likely :-)) ?

Any help or suggestion would be much appreciated.



To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org

View raw message