vim ~/.emma/emmarc
db_encoding=latin1
改为
db_encoding=utf8
sudo vim /usr/share/emma/emmalib/mysql_host.py
跳到155行左右的_use_db(self, name, do_query=True),改成如下
def _use_db(self, name, do_query=True):
if self.current_db and name == self.current_db.name: return
if do_query:
self.query("use `%s`" % name, False)
self.query("set names utf8", False) #modify
try:
self.current_db = self.databases[name]
except KeyError:
print "Warning: used an unknown database %r! please refresh host!\n%s" % (name, "".join(traceback.format_stack()))
时间: 2024-11-05 18:57:31