phpencodingcharactericonvthai

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


Solution

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

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