Deep Analysis of MySQL garbled Problem

Source: Internet
Author: User
The company has purchased a new batch of PCs and is ready to upgrade several better-performing PCs to database servers to replace old machines. The company has a set of POS terminal software. The backend data storage is MySQ.

The company has purchased a new batch of PCs and is ready to upgrade several better-performing PCs to database servers to replace old machines. The company has a set of POS terminal software. The backend data storage is MySQ.

I. Overview

The company has purchased a new batch of PCs and is ready to upgrade several better-performing PCs to database servers to replace old machines. The company has a set of POS terminal software, and the background data storage is MySQL 3.23. I want to upgrade the database software while preparing the hardware upgrade. However, the upgrade encountered a well-known MySQL garbled problem. After searching for information, coupled with your own exploration and experience, we finally solved this problem perfectly.

MySQL garbled characters (including not only Chinese garbled characters, but also garbled characters in other languages) only exist in MySQL 4.1 and later versions. MySQL versions earlier than 4.1 do not support multiple languages, so it will store the data you have given it, and then read it out. From the byte point of view, data will not change in this process, so there will be no garbled characters.

MySQL 4.1 and later versions start to support multiple languages. The so-called multi-language is that MySQL will convert the encoding for you during input and output. This conversion rule is determined by the client and server encoding.

The encoding conversion rule is to convert the encoding from "client encoding" to "server encoding" during data input ", during output, data is converted from "server-side encoding" to "client encoding ".

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.