Android string encoding and html entities converting

android, encoding, entities, html

Solution

to decode Html String you can use `Html.fromHtml()`

like

Html.fromHtml((String) htmlCode).toString();

if you want reverse

than you can use `TextUtils.htmlEncode()`

Problem

There is a String in Android Java. How do I change it to another given encoding and replace HTML-entities such as `&` with `&`? This is so that international symbols can be displayed correctly.

Original source