Android での基本的な HTTP リクエスト応答の例に取り組んでいます。このサンプル プロジェクトでは、Google 翻訳の URL を使用してみました。ただし、他の言語の文字は、応答でジャンク値または 16 進数値に置き換えられます。デスクトップ ブラウザから URL にアクセスすると、正常に動作します。
コードは次のとおりです。
httpClient = new DefaultHttpClient();
httpGet = new HttpGet("https://translate.google.com/m?hl=en&sl=en&tl=gu&
ie=UTF-8&prev=_m&q=sample") ;
httpResponse = httpClient.execute(httpGet);
HttpEntity httpEntity = httpResponse.getEntity() ;
responseString = EntityUtils.toString( httpEntity, HTTP.UTF_8 );
// http response is all good except the characters that are in different
// language are replaced by hex or junk characters.
私は何を間違っていますか?何か助けはありますか?