in Android

Convert HTML special characters to normal text

Apache commons is once again the answer on “how to convert HTML special characters to normal text”.

Just include the commons-lang jar in your project and use only one line of code:
System.out.println(StringEscapeUtils.unescapeHtml3("special chars here"));

Commons Lang

The standard Java libraries fail to provide enough methods for manipulation of its core classes. Apache Commons Lang provides these extra methods.
Lang provides a host of helper utilities for the java.lang API, notably String manipulation methods, basic numerical methods, object reflection, concurrency, creation and serialization and System properties. Additionally it contains basic enhancements to java.util.Date and a series of utilities dedicated to help with building methods, such as hashCode, toString and equals.

Share