Article From:

Problem 1 Chinese insertion operation cannot be performed in CentOS.
Problem 2 when inserting in a visual tool in windows, although it can be successful, and display in the visualization tool is normal, but in CentOS select is a random code. I looked at the client and server encoding utf8.
Picture description

I have configured what I coded, and I would like to ask you, what else can this be?

Answer 0:

You set up utf8, but the character you inserted is not utf8 encoding.

Answer 1:

Check the set of characters that you use. It can be show create table tableName;

1:Take a look at your centos7’s current character set, echo $LANG.
2:What tools do you use to connect to Linux? Some of the tools are not allowed to display Chinese in default. You can try this tool with xshell.

Answer 2:

Make sure that the character inserted is UTF-8

Answer 3:

Take a look at the CHARACTER SET of the field definition of your table.

Answer 4:

set names utf8;

Answer 5:

View the table property, and whether the character attribute of the current field is consistent with the data (value) of your insert.

Answer 6:

What code is the pseudo terminal interface you use?

Answer 7:

It is clear that the terminal character set is not utf8

Leave a Reply

Your email address will not be published. Required fields are marked *