function utf8_to_tis620

This function converts the string from utf8 to tis620. For example, the webpage use encoding utf-8 but table charset is ​​tis620. So i must convert strings to tis620-strings before saving by using this custom function or built-in function to your discretion. At my experience, i have use built-in function for Thai language conversion but possess a flaw on some figures. Therefore i change to refer to this custom function instead.

function tis620_to_utf8

This function converts the string of tis620 to utf8, such as data stored in the table is tis620 but when display on page it as utf8 (as is standard encoding on webpage today).

Through this post html to pdf with php ที่รองรับภาษาไทย, using this custom function for conversion data.

php convert utf-8 to tis-620 and tis-620 to utf-8