Solve the Problem of converting MSSQL into MySQL garbled code

Source: Internet
Author: User

To convert the MSSQL database to MySQL, the key fields of a news table are title, content, and title. The field type of varchar content is ntext, after I use the migration toolkit for conversion, the result is displayed as null. There is no character, and there is a table. Because all are in English, the data is displayed normally, later, I changed the default character encoding to utf8 IN THE administator attack. The title is garbled and the content column is normal. If many MySQL parameters are being modified, for example, using GBK or gb2312b does not help. I am overwhelmed. When I insert a Chinese character, it is displayed correctly. This indicates that the converted table still supports Chinese characters. I think it should be wrong when converting, because content in MSSQL is of the Unicode type ntext. Varchar is not, so when I connect to MSSQL in the migration tool, fill in the connection string selected in the advanced mode:

JDBC: jtds: sqlserver: // localhost: 1433/cjwz_zj; user = sa; Password = sa; charset = gb2312; domain =

JDBC: jtds: sqlserver: // ip address: Port/database; user = username; Password = password; charset = gb2312; domain =

The key is the red part. If it is not written, I guess the default value is charset = uft8. Therefore, varchar cannot be directly transferred, so we need to add this part.

Summarize the problem of database encoding in another day.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.