Inserting Chinese is garbled, tried a lot of methods, such as I first set the VIM to: set Fileencoding=utf-8 does not work, and then think about, and vim has nothing to do with
Then try C # code, using the Encoding.UTF8.GetString () method, and then not.
I was depressed, suddenly remembered to could there be MySQL setup problem???
So, sudo nano/etc/mysql/my.cnf
Insert the following red code, Default-character-set = UTF8, success, not garbled ~ ~ ~ No encoding ...
# This is formally known as [Safe_mysqld]. Both versions is currently parsed.
[Mysqld_safe]
Socket =/var/run/mysqld/mysqld.sock
Nice = 0
[Mysqld]
#
# * Basic Settings
#
user = MySQL
Pid-file =/var/run/mysqld/mysqld.pid
Socket =/var/run/mysqld/mysqld.sock
Default-character-set = UTF8
Port = 3306
Basedir =/usr
DataDir =/var/lib/mysql
Tmpdir =/tmp
Language =/usr/share/mysql/english
Skip-external-locking
http://www.bkjia.com/PHPjc/318002.html www.bkjia.com true http://www.bkjia.com/PHPjc/318002.html techarticle inserting Chinese is garbled, tried a lot of methods, such as I first set the VIM to: Setfileencoding=utf-8 does not work, and then think about it, and vim has nothing to do with the C # code, ...