Mysql utf8 garbled characters in the windows command line. If you want to set the database encoding to utf8, you must first set my In the mysql installation path. the default-character-set attribute in the INI file is set to utf8, that is, default-character-set = utf8, and then enter the command show variable like 'Char % '; command to check whether all character sets have been changed to utf8. If yes, you have set them successfully. After setting it to utf8, if you use the management tool to operate mysql, you will find that the Chinese field value is correct, but if you use the command line to query it, garbled characters will occur. When you insert the Chinese field value, the error message "Incorrect string value: '\ xD6 \ xD0 \ xCE \ xC4' for column" is also displayed. This may be related to the problem that the hosts page of windows command line is encoded as gbk, enter the command set names gbk before performing the query or update operation; this command can set the encoding with three configurations to gbk so that you can perform normal Chinese operations. After the operation is complete, you can enter set names utf8. The encoding is reset.