Each time I SSH to my Fedora Server, the locale setting is not right. $ locale locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: ??? LC_ALL ????????: ????????? LC_CTYPE=UTF-8 LC_NUMERIC="zh_CN.UTF-8" LC_TIME="
1.查看系统是否支持简体中文 locale -a 2.修改编码方式 vim /etc/sysconfig/i18n 将文件内容修改为下面文本: LANG="zh_CN.UTF-8" SUPPORTED="zh_CN.GB18030:zh_CN:en_US.UTF-8:en_US:en" SYSFONT="latarcyrheb_sun16"
mysql中文乱码解决方法:将mysql数据库编码统一utf8 查看数据库编码: show variables like 'character%'; 编辑/etc/my.cnf [mysql] default-character-set=utf8 [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to preve