开发者

Migrating Multibyte Characters from MSSQL sever to MySQL

I am writing PHP scripts to migrate data from Microsoft SQL Server to MySQL, this has been smooth so far, except multibyte characters. can somebody help me to get over with this. What are the points that should be taken care of from PHP and MySQL database perspective.

  1. Do i have to make some changes in MySQL configuration?
  2. Do i have to change character encoding in PHP for mul开发者_如何学运维tibyte characters, if yes how?
  3. Is there anything else i am missing?

Thanks.


I recently added a translation module for our company's website. I did the following to make sure the DB was up for multibyte goodness

  1. Setting encoding and collation to UTF8
  2. Make sure your MySQL connection is configured to accept UTF8 characters. You can do this by running the query SET NAMES utf8 prior to transferring. However, there are other ways to do this (I added SET NAMES utf8 because that's how I did it.)

The following threads have more info

SET NAMES utf8 in MySQL?

Whether to use "SET NAMES"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜