SELECT collationproperty (' Chinese_prc_stroke_ci_ai_ks_ws ', ' CodePage ')
Returns 936, which is the GBK encoding.
936 Simplified Chinese GBK
950 Traditional Chinese BIG5
437 US/Canada English
932 Japanese
949 Korean
866 Russian
65001 Unicode UFT-8
If the field is in Chinese and the PHP file setting is encoded as GBK2312, then there is no problem with database information:
Print_r ($rs ["Customer Code"]);
If the PHP file setting is encoded as Utf-8, an error is reported.
If you do not want 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 record array
There's no problem with that.
http://www.bkjia.com/PHPjc/326145.html www.bkjia.com true http://www.bkjia.com/PHPjc/326145.html techarticle SELECT collationproperty (' Chinese_prc_stroke_ci_ai_ks_ws ', ' CodePage ') returns 936, which is the GBK encoding. 936 Simplified Chinese GBK 950 Traditional Chinese BIG5 437 us/Canada English 932 Japanese ...