I installed windows 7 with code page 950. Now my php with utf8 query cannot run the query in mysql. It said invalid utf8 chracter..So, my question is how can I encode the non-ascii character from code page 950 string to utf8 string?
Thanks
I installed windows 7 with code page 950. Now my php with utf8 query cannot run the query in mysql. It said invalid utf8 chracter..So, my question is how can I encode the non-ascii character from code page 950 string to utf8 string?
Thanks
You could try this:
iconv(mb_detect_encoding($text, mb_detect_order(), true), "UTF-8", $text);
But I don't guarantee it'll work as it's quite hard to detect the old format and convert to UTF8.