MySQL Chinese garbled solution method

Source: Internet
Author: User

Recently in the. NET project with the EF connection mysql, inserting Chinese data is always garbled, when the table was created, the encoding has been specified, but still garbled, tossing for a while to find in the connection string also add the specified code

Character Set=utf8 (Server=xxxxx;user id=xxxx;password=xxxxx; Character Set=utf8;d atabase=xxxxx)

To run the program again to insert data will not be garbled in the case of Chinese

In the Java project as well, if the connection string does not include the specified encoding, the insertion of Chinese data will appear garbled

jdbc.url=jdbc:mysql://xxxxxx/xxxxxxxx?useunicode=true&Characterencoding=utf8

It took some time to solve the problem, to summarize here

MySQL Chinese garbled solution method

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.