We all know that MySQL4.0 has Chinese garbled characters in actual operations. The following articles mainly describe the actual operation solution to solve the Chinese garbled characters in MySQL4.0, if you are interested in the actual operation method, you can click the following article.
Not long ago, MySQL database + asp. net2.0 was used in project development. This is the first time I used MySQL, and I had to use MySQL due to customer requirements.
Project development encountered Chinese Input and Output garbled, on the Internet also google a few articles, probably know the reason; that is, MySQL will encode it as "ISO-8859-1" for storage, when there is no way to store and read Chinese data in the program, the first "ISO-8859-1" and "gb2312" between the conversion. In this way, Chinese garbled characters can be solved.
Convert ISO-8859-1 encoding to gb2312 Code as follows:
- Var temp = Encoding. GetEncoding ("ISO-8859-1"). GetBytes (strInput );
- Return Encoding. GetEncoding ("gb2312"). GetString (temp );
I used the most stupid method to solve the problem of Chinese garbled characters in MySQL4.0. We also hope that you will have a better way to learn. Ha
Tip: MySQL can solve Character Set problems. You can specify a table or a separate field.
The above content is the description of MySQL4.0 Chinese storage, hoping to help you in this regard.