UTF-8 encoding bug on PHP older than 5.4

In PHP older than 5.4.0, the default charset for htmlspecialchars() and html_entity_decode() was ISO-8859-1, which created erroneous UTF-8 characters