0

I have created an application in android which reads RSS feeds and shows them in a list view. I can read a feed like this "http://blog.createcreativity.ir/index.php/feed/" without any problem. But when I try to read from a feed like this "http://cbi.ir/exratesrss.aspx?code=usd" the words in persian are converted to chars like these :

ÙØ±Ø® ارز ÙØ±Ø¬Ø¹

Would anybody help me out please?

Babak Fakhriloo
  • 2,076
  • 4
  • 44
  • 80
  • Did you have a look to these closely related questions: [1](http://stackoverflow.com/questions/13568323/show-another-characters-instead-of-persian-characters-by-connect-to-mysql-in-and), [2](http://stackoverflow.com/questions/15855875/dipaly-farsi-text-in-android-webview-for-phones-not-supporting-farsi), [3](http://stackoverflow.com/questions/10061091/how-can-i-support-farsi-persian-text-in-android)? – jap1968 Jun 12 '13 at 18:53
  • Yes. I looked them, and as I said I cant show Persian content from the first feed I mentioned, but the second one, no. Even I used this code for reading inputsource : InputSource is = new InputSource(); is.setEncoding("UTF-8"); – Babak Fakhriloo Jun 12 '13 at 18:56

1 Answers1

0

I solved the problem. Here is what I did to read the http response:

HttpEntity httpEntity = httpResponse.getEntity();

xml = EntityUtils.toString(httpEntity);

so I tried using the other overload of EntityUtils.toString as follow:

xml = EntityUtils.toString(httpEntity, HTTP.UTF_8);
Babak Fakhriloo
  • 2,076
  • 4
  • 44
  • 80