PHP code conversion. SELECTCOLLATIONPROPERTY (Chinese_PRC_Stroke_CI_AI_KS_WS, CodePage) returns 936, that is, GBK encoding. 936 simplified Chinese GBK950 traditional Chinese BIG5437 U.S. Canadian English 932 Japanese select collationproperty ('Chinese _ PRC_Stroke_CI_AI_KS_WS ', 'codepage ')
The return value is 936, which is GBK encoding.
GBK, Simplified Chinese, 936
950 traditional Chinese BIG5
437 US/Canada English
932 Japanese
Korean 949
866 Russian
65001 unicode UFT-8
If the field contains Chinese characters and the PHP file is encoded as GBK2312, there is no problem in retrieving the database information:
Print_r ($ rs ["customer code"]);
If the php file is UTF-8 encoded, an error is reported.
If you need to set the php file encoding to UTF-8, you need to convert the encoding:
Print_r ($ rs [mb_convert_encoding ("customer code", "GBK", "UTF-8")]); // Print the record array
So there is no problem.
Http://www.bkjia.com/PHPjc/326145.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/326145.htmlTechArticleSELECT COLLATIONPROPERTY ('Chinese _ PRC_Stroke_CI_AI_KS_WS ', 'codepage') returns 936, that is, GBK encoding. 936 simplified Chinese GBK 950 traditional Chinese BIG5 437 American/Canadian English 932 Japanese...