0

I have string like "äså" that needs to be converted like "äså" so how can we do that?.

Thanks in advance.

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
Anand
  • 1,315
  • 1
  • 12
  • 18

3 Answers3

1

You need to double-unescape the string, using commons-lang StringEscapeUtils:

StringEscapeUtils.unescapeHtml(StringEscapeUtils.unescapeHtml(string))
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
0

If nothing is working then one simplest thing you can do is enclose whatever string you have within and do a xml parse using the SAX Parser on the device. This will give you a callback to decode xml entities wherein you can replace the characters. There are a lot of places wherein you can get a map.

user210504
  • 1,749
  • 2
  • 17
  • 36
-1

you may try Uri.decode(yourString)

Buda Gavril
  • 21,409
  • 40
  • 127
  • 196