插入中文是乱码,尝试了许多方法,比如我先把vim里设置为:set fileencoding=utf-8不起作用,后来想想也对,和vim没什么关系
然后就尝试c#代码,用Encoding.UTF8.GetString()方法,后来也不对。
我就郁闷了,忽然想起来莫不是mysql的设置问题???
于是,sudo nano /etc/mysql/my.cnf
插入下面红色代码,default-character-set = utf8,成功,不乱码了~~~根本不用什么Encoding…..
# This was formally known as [safe_mysqld]. Both versions are 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
菜鸟
为什么,我这样做不行呢?
QQ:276346365,Email:elve1984@163.com
I just want to say I’m all new to blogs and definitely savored this blog. Most likely I’m likely to bookmark your website . You certainly have exceptional articles. With thanks for sharing with us your blog site.
For latest information you have to pay a quick visit world-wide-web and on internet I found this website as a finest website for latest updates.
I’ve been exploring for a little bit for any high quality articles or weblog posts in this sort of area . Exploring in Yahoo I eventually stumbled upon this site. Reading this information So i’m happy to convey that I have an incredibly excellent uncanny feeling I came upon just what I needed. I so much without a doubt will make certain to don’t fail to remember this site and provides it a look on a relentless basis.
I used to be recommended this website through my cousin. I’m not certain whether this publish is written by means of him as no one else recognise such distinctive approximately my problem. You are amazing! Thanks!
I do not even know how I ended up here, but I assumed this publish used to be great. I don’t understand who you might be but certainly you’re going to a well-known blogger when you aren’t already
Cheers!
I am genuinely happy to glance at this webpage posts which includes lots of helpful data, thanks for providing these data.