http://stackoverflow.com/questions/4480363/android-java-utf-8-httpclient-problem http://stackoverflow.com/questions/1900409/how-to-read-non-english-texts-in-java-they-are-represented-in-wrong-encoding
On Fri, Jan 27, 2012 at 4:30 PM, TurboMan <yusufce...@gmail.com> wrote: > Hi, > > I've been bogging down for a while but no like. > I am trying to get a page with HTTP request, but it has non-ascii characters > such as "Ç", "Ş", "İ", "Ö", "Ğ". > But, I see other characters without any problem except those kind of > characters. > I use the following code, got it through google search. > It does the job except the above problem. > > String responseString; > HttpClient httpclient = new DefaultHttpClient(); > HttpResponse response = httpclient.execute(new > HttpGet("http://somepage.com")); > StatusLine statusLine = response.getStatusLine(); > if(statusLine.getStatusCode() == HttpStatus.SC_OK){ > ByteArrayOutputStream out = new ByteArrayOutputStream(); > DataOutputStream dout = new DataOutputStream(out); > response.getEntity().writeTo(dout); > out.close(); > responseString = out.toString(); > httpclient.getConnectionManager().shutdown(); > } > > Any help is appreciated > > Regards > TM > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 4.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en