解å³æ¹æ³ï¼
ä¸. Ubuntué»è®¤çä¸æå符ç¼ç
Ubuntué»è®¤çä¸æå符ç¼ç 为zh_CN.UTF-8ï¼è¿ä¸ªå¯ä»¥å¨
/etc/environmentä¸çå°ï¼
sudo gedit /etc/environment
å¯ä»¥çå°å¦ä¸å
容ï¼
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh:en_US:en"第äºè¡å³æ¯é»è®¤çä¸æå符ç¼ç ã注ï¼å¯ä»¥éè¿è¿éä¿®æ¹é»è®¤çä¸æç¼ç å符ï¼æ¯å¦ä¿®æ¹ä¸ºï¼zh_CN.GBKã
äº. æ·»å ä¸æå符ç¼ç çæ¹æ³
1. ç´æ¥ä½¿ç¨locale-gen
å¨ç»ç«¯è¾å
¥å½ä»¤ï¼
sudo locale-gen zh_CN.GB18030
å³å¯å®æä¸æå符éçæ·»å ãå®æåå¯ä»¥è½¬å°
/usr/lib/locale/ï¼ä¸é¢å·²ç»æä¸ä¸ªzh_CN.gb18030æ件夹ï¼å¨è¶
级ç»ç«¯è¾å
¥å½ä»¤ï¼
gedit /var/lib/locales/supported.d/localï¼å¯ä»¥åç°æ件ä¸å¤äºä¸è¡ï¼zh_CN.GB18030 GB18030ã说ææ·»å æåã
2. éè¿ä¿®æ¹/var/lib/locales/supported.d/localæ件
å¨ç»ç«¯è¾å
¥å½ä»¤è¡
sudo gedit /var/lib/locales/supported.d/local
å¯ä»¥çå°å¦ä¸å
容ï¼
zh_CN.UTF-8 UTF-8
en_US.UTF-8 UTF-8
å¨æ件尾添å ä¸æå符é
zh_CN.GBK GBK
ä¿ååéåºãå¨ç»ç«¯è¾å
¥å½ä»¤ï¼
sudo dpkg-reconfigure locales
Generating locales...
en_AU.UTF-8... done
en_BW.UTF-8... done
en_CA.UTF-8... done
en_DK.UTF-8... done
en_GB.UTF-8... done
en_HK.UTF-8... done
en_IE.UTF-8...
/etc/profile
LC_ALL=zh_CN.UTF-8
温馨提示:答案为网友推荐,仅供参考