简体   繁体   中英

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 multibyte 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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM