Ubuntu MySQL Emma Chinese garbled problem resolution Emma is installed with Apt-get by default, Emma is not supported in Chinese, configuration files or directly modify the Emma program source files (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 155 rows or so _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 name = = 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] Exce PT Keyerror:print "warning:used an unknown database%r! Please refresh host!/n%s "% (name," "". Join (Traceback.format_stack ()))
Ubuntu MySQL Emma Chinese garbled problem solved