I am moving a PHP application to another server, and I have some issues with the character decoding:
Old server (CentOS with Plesk Panel):
echo htmlentities('ú'), ENT_QUOTES, 'UTF-8'); // Result ú
echo html_entity_decode('ú', ENT_QUOTES, 'UTF-8'); // Result ú <= expected
New server (Debian dedicated server, fresh install):
echo htmlentities('ú'), ENT_QUOTES, 'UTF-8'); // Result ú
echo html_entity_decode('ú', ENT_QUOTES, 'UTF-8'); // Result ú <= not expected
echo html_entity_decode('ú', ENT_QUOTES, 'ISO-8859-1'); // Result ú <= expected
Why is happening this? Maybe a server configuration problem?