ubuntu下设置locale

在bash下中文乱码,因为locale没有正确设置,在bash下执行:

/usr/share/locales/install-language-pack zh_CN

sudo locale-gen

编辑用户主目录下 ~/.bashrc 文件,添加内容

export LANG="zh_CN.UTF-8"
export LANGUAGE="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
posted on 2014-06-17 16:35  shengrui  阅读(340)  评论(0编辑  收藏  举报