PHP如何将代码页950转换为utf8

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.

Will it be a help for you if you try mb_convert_encoding() in PHP?