Skip to content Skip to sidebar Skip to footer

Convert Html Character Code To Char In Java

Our XML feed gives us encoded UTF-8 characters inside ISO-8859-1 a file. This is being fed into the database. So the text is ISO-8859-1 encoded and contains following stuff: &#

Solution 1:

You can use the StringEscapeUtils from Apache Commons: http://commons.apache.org/lang/api-2.6/org/apache/commons/lang/StringEscapeUtils.html

next time search before: How to convert from HTML to UTF-8 in java

Solution 2:

If you need small lib for this, you can use HTMLEntitles

http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=htmlentities

Post a Comment for "Convert Html Character Code To Char In Java"