I'm using htmlentities () in PHP to store data in the database, replacing ç , ã , and other characters by HTML entities:
<?PHP
htmlentities ("Ampliação");
//Resulta na string "Ampliação
In Java (Android) I need to decode these entities to their respective source values ("Magnification"), but I did not find an effective solution, just the
StringEscapeUtils.unescapeHtml4 (String)
but it is converting to characters other than originals, as well as being deprecated.
The method
URLDecoder.decoder (String)
It also did not result in the original string.
Any tips?