The encoding bug in entity enclosing methods (such as POST) has been fixed right after 
2.0 alpha2 release. The problem should go away with the most recent CVS snapshot. Give 
it a shot

Cheers

Oleg  

>Is that fixed now? 
>I tested this issue with HttpClient 2.0 alpha2 and the result was the same
>(wrong encoding)!
>Thomas
>
>-----Ursprüngliche Nachricht-----
>Von: Kalnichevski, Oleg [mailto:[EMAIL PROTECTED]]
>Gesendet: Mittwoch, 15. Januar 2003 10:22
>An: Commons HttpClient Project
>Betreff: RE: POST method - Default content encoding
>
>
>Thomas 
>
>It undoubtedly *should* be ISO-8859-1 by default. Currently system default
>encoding is used regardless of the 'Content-Type' header value.
>
>We are aware of the bug. I have already posted a patch that fixes (well,
>attempts to fix) all known encoding related problems. Unfortunately, all our
>committers are currently either missing in action or too busy. So, please,
>stay tuned. The fix is expected soon
>Oleg
>
>-----Original Message-----
>From: Mathis Thomas (VTG) [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 15, 2003 10:11 AM
>To: 'Commons HttpClient Project'
>Subject: POST method - Default content encoding
>
>
>I think that the default encoding for a post should also be ISO-8859-1, is
>that right?
>
>With the latest nightly build I sent a post to a server with german umlauts
>and these characters were endoded with UTF-8. I used following code:
>
>....
>PostMethod post = new PostMethod();
>post.setHttp11( true );
>post.setPath( "/samplepath" );
>post.addParameter( "TXT", "Testtext: öäüÖÄÜß");
>String s;
>try {
>  //post.setRequestHeader( "Content-Type", "text/plain; charset=ISO-8859-1"
>);
>  int ret = client.executeMethod( post );
>  s = post.getRequestBodyAsString();
>  System.out.println( "requestBody=" + s );
>} catch (Exception ex ) {
>  ex.printStackTrace();
>}
>....
>
>The output is :
>requestBody=TXT=Testtext%3A%20%C3%B6%C3%A4%C3%BC%C3%96%C3%84%C3%9C%C3%9F
>but schould be: requestBody=TXT=Testtext%3A%20%F6%E4%FC%D6%C4%DC%DF
>Even if I use the outcommented line it does not change the output.
>
>Thanks in advance,
>Thomas
>
>---------------------------------------------------------------------
>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