Skip to content
Advertisement

php iconv character encoding from Thai ISO-IR-166 to utf-8 doesn’t work

Why this line of code:

$convertedChar = iconv('ISO-IR-166', "UTF-8", '¤');

returns “ยค” instead of “ค”?

also

$convertedChar = iconv('ISO-IR-166', "UTF-8", 'Á');

returns false instead of “ม”.

Advertisement

Answer

After all your helps I’ve got to this result:

$convertedChar = iconv('ISO-IR-166', "UTF-8", utf8_decode('¤'));
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement