mysql insert Chinese data becomes how to deal with a question mark

Chinese data is inserted into a question mark, usually because the character set is not set to the reason utf8

1, modify the character set:

ALTER TABLE MODIFY column name table type (50) CHARACTER SET "utf8";

Such as: the ALTER TABLE t_student the MODIFY stuname VARCHAR (50) the CHARACTER the SET "UTF8";  (Modify t_student table stuname character set is UTF8)

Guess you like

Origin www.cnblogs.com/bbeb/p/10963343.html