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.
如果您尝试在PHP中使用mb_convert_encoding() ,对您有帮助吗?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.