correction of htmlspecialchars() for PHP 5.4 on non UTF-8