Got the latest nightly source. I think it's not fixed yet. 
Am I wrong in expecting the following line?
requestBody=TXT=Testtext%3A%20%F6%E4%FC%D6%C4%DC%DF

My sample code:

public class TestPostCharacterEncoding {

    public static void main(String[] args) {
        System.out.println( (new Boolean(false)).toString() );

        HostConfiguration config = new HostConfiguration();
        config.setHost( "www.vtg.at", 80, "http" );

        HttpClient client = new HttpClient();
        client.setHostConfiguration( config );

        PostMethod post = new PostMethod();
        post.setHttp11( true );
        post.setPath( "/samplepath" );
        post.addParameter( "TXT", "Testtext: öäüÖÄÜß");

        try {
            //post.setRequestHeader( "Content-Type", "text/plain;
charset=ISO-8859-1" );
            int ret = client.executeMethod( post );
            String s = post.getRequestBodyAsString();
            System.out.println( "requestBody=" + s );
        } catch (Exception ex ) {
            ex.printStackTrace();

        }


    }
}

RESULT:
requestBody=TXT=Testtext%3A%20%C3%B6%C3%A4%C3%BC%C3%96%C3%84%C3%9C%C3%9F
SHOULD BE:
requestBody=TXT=Testtext%3A%20%F6%E4%FC%D6%C4%DC%DF

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 3. Februar 2003 15:29
An: Commons HttpClient Project
Cc: Mathis Thomas (VTG)
Betreff: Re: POST method - Default content encoding


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  

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

Reply via email to