hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vasiliy Keretsman ...@e-mobilink.com>
Subject problem with posting cyrillic characters
Date Wed, 27 Oct 2004 15:22:10 GMT
hi there!

I have got a problem with posting cyrillic character using
http-client-2.0.2.

I receive somethig like "???? ?? ????" on server-side.

Could anyone help me?

Thank you.

here is bit of code :
-----------------------

      try {
          NameValuePair[] form_data = {new NameValuePair("param", "Тестовая строка")};
          requestMethod.setRequestBody(form_data);

          DefaultMethodRetryHandler retryhandler = new DefaultMethodRetryHandler();
          retryhandler.setRequestSentRetryEnabled(false);
          retryhandler.setRetryCount(3);
          requestMethod.setMethodRetryHandler(retryhandler);

          // Execute the method.
          int statusCode = client.executeMethod(requestMethod);

          System.out.println("STATUS CODE:"+ statusCode);
          System.out.println("STATUS LINE:"+ requestMethod.getStatusLine());
          if (statusCode == HttpStatus.SC_OK) {
              System.out.println("Response Body:\n---\n" + requestMethod.getResponseBodyAsString());
          }
    }catch(Exception e){
        e.printStackTrace();
    } finally {
          // Release the connection.
          requestMethod.releaseConnection();
   }








  

-- 
Best regards,
 Vasiliy                          mailto:vk@e-mobilink.com


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


Mime
View raw message