bindal
bindal

Reputation: 1932

Show Special Characters in android

I am working in one application in i have to show following characters

Chanéac

Yûka

But when i call this webservice this characters are converted into some other characters like

Chanéac Converted to Chanéac

Yûka Converted to y&Atlide;»ka

Please give me some solution Thanks

Upvotes: 0

Views: 130

Answers (1)

wangyif2
wangyif2

Reputation: 2863

Use UTF-8 format with whatever you are using to read from the Webservice in your android app, for example, if you are using a BufferReader:

BufferedReader reader = new BufferedReader(
  new InputStreamReader(inputStream, "UTF-8"), 8);

Edit:

And it seems like what you need is HTML entity decoding in android, try something like this:

Html.fromHtml(string);

Upvotes: 1

Related Questions