Hello, We are using apache commons HttpClient library (commons-httpclient-3.1.jar).
Users are providing username and password that has multibyte characters in it. Base64 encoding of the mutlitbyte characters in HttpClient doesn’t seem to be working. Below API’s are used: Credentials credents = new UsernamePasswordCredentials(userId, password); m_httpState.setCredentials(realm, m_host, credents); m_httpClient.executeMethod(m_hostConf,httpmethod,m_httpState); I have a text test1:测试组:Designer:test1 Capturing the network trace from the client that uses the above jar (note: the authorization header): HEAD /tc/FileAccess/ HTTP/1.1 User-Agent: DAKCLIENT/7.0 Accept-Language: zh-CN Authorization: Basic dGVzdDE6Pz8/OkRlc2lnbmVyOnRlc3Qx Host: ahi6w033:8888 Using the online Base64 decoder utility (http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/Default.aspx) , passing dGVzdDE6Pz8/OkRlc2lnbmVyOnRlc3Qx results the decoding to be test1:???:Designer:test1 (note: ???) Using the online encoder utility: test1:测试组:Designer:test1 gets Base64 encoded as : dGVzdDE65rWL6K+V57uEOkRlc2lnbmVyOnRlc3Qx This makes me believe that Base64 encodign in common’s apache isn’t working correctly. Please help and advice. Thanks.. Usha -- View this message in context: http://old.nabble.com/apache-commons-HttpClient-Base64-encoding-of-multibyte-characters-issue-tp27263367p27263367.html Sent from the HttpClient-User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org