ubuntu修改系统默认编码的方法是:
1. 参考 /usr/share/i18n/SUPPORTED 编辑/var/lib/locales/supported.d/*
gedit /var/lib/locales/supported.d/local
gedit /var/lib/locales/supported.d/zh-hans
如:
more /var/lib/locales/supported.d/local
zh_CN GB18030
zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8
zh_CN.GB2312 GB2312
en_US.UTF-8 UTF-8
2.生成locale(自动保存在/usr/lib/locale/中)
locale-gen
3.修改locale
vi /etc/default/locale
改为:
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN:zh:en_US:en"
4.重新启动或切换下运行级别,查看locale
locale