ubuntu mysql Emma Chinese garbled problem solve Emma by default with Apt-get installation, Emma does not support Chinese, configuration file or directly modify the Emma program source file (Python). Apt-get installed Emmasudo apt-get install Emma Ubuntu Apt-get installation Emma is under the/usr/share/emma directory. Cd/usr/share/emma/emmalib sudo vim __init__.py find "db_encoding": "Latin1" changed to "db_encoding": "UTF8" to save exit. If you've already installed and run Emma, the program will create a ~/.emma/emmarc file and save the configuration. So you can change the configuration file here, or directly modify Emma's Python source file as below. Vim ~/.emma/emmarc Find db_encoding=latin1 change to Db_encoding=utf8 then sudo vim/usr/share/emma/emmalib/mysql_host.py jump to 1 55 lines around the _use_db (self, name, do_query=true) function, change to the following Def _use_db (self, Name, do_query=true): if self.current_db and N Ame = = Self.current_db.name:return if Do_query:self.query ("Use '%s '"% name, False) Self.query ("Set names UTF8", False) try:self.current_db = Self.databases[name] Except Keyerror:print "warning:used an unknown database%r! Please refresh host!/
Ubuntu MySQL Emma Chinese garbled problem solved