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

516 views Asked by At

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 "ม".

1

There are 1 answers

0
Marsa Baniasadi On BEST ANSWER

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

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