I have string like "äså"
that needs to be converted like "äså"
so how can we do that?.
Thanks in advance.
I have string like "äså"
that needs to be converted like "äså"
so how can we do that?.
Thanks in advance.
You need to double-unescape the string, using commons-lang StringEscapeUtils
:
StringEscapeUtils.unescapeHtml(StringEscapeUtils.unescapeHtml(string))
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.