今天在一個Ubuntu的虛擬機里遇到編碼相關的問題:
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "zh_CN.UTF-8" are supported and installed on your system.
解決辦法就是安裝zh包:
apt-get install language-pack-zh-hans
安裝完后,就可以顯示中文字符了。