MySQL Forums
Forum List  »  Chinese

我想,在简体中文Windows下你应该用GBK而不是用UTF-8,除非……
Posted by: Liu 刘 Yan 研
Date: October 25, 2007 04:33AM

虽然服务器端用 UTF-8 保存数据,但如果你在简体中文 windows 下运行你的程序的话,汉字的编码是以 GB18030/GBK/GB2312 字符集进行编码的,除非你的程序全部将其转换为 UTF-8 编码再送给 MySQL,否则 connection string 里用 charset=utf8 连接数据库后,往数据库写的数据肯定会变成乱码。

Options: ReplyQuote


Subject
Views
Written By
Posted
我想,在简体中文Windows下你应该用GBK而不是用UTF-8,除非……
7322
October 25, 2007 04:33AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.