各位:
我有一個關於 gen locales 的問題向大家請教....
事情是這樣子, 我見我的系統都會有亂碼,
跟據推斷, 最大可能是因為是系統語系問題,
系統 :
Debian 5.0 lenny ~Kernel 2.8x
RAMS 512 MB
情況如下:
command # apt-get update
出現
亂碼)
撌脫? http://www.hk.debian.org lenny Release.gpg
?仿? http://www.hk.debian.org lenny/main Translation-en_HK
?仿? http://www.hk.debian.org lenny/contrib Translation-en_HK
?仿? http://www.hk.debian.org lenny/non-free Translation-en_HK
撌脫? http://www.hk.debian.org lenny Release
?仿? http://www.hk.debian.org lenny/main Packages/DiffIndex
?仿? http://www.hk.debian.org lenny/contrib Packages/DiffIndex
?仿? http://www.hk.debian.org lenny/non-free Packages/DiffIndex
?仿? http://www.hk.debian.org lenny/main Sources/DiffIndex
每次我都用來解決問題...
export LANG=en_HK.UTF-8
export LANGUAGE=en_HK.UTF-8
export LC_ALL=en_HK.UTF-8
長此下去都不是辦法....
決定根絕一下, 扒了很多文章也找不到解決方法
****** 以下是我系統的設定 ******
command # export
declare -x HOME="/root"
declare -x LANG="en_HK.UTF-8"
declare -x LANGUAGE="zh_TW:zh" <-- 問題!!
declare -x LOGNAME="root"
command # cat /etc/environment
~.# LANG=en_HK.UTF-8
~#
command # dpkg-reconfigure locales
Generating locales (this might take a while)...
en_HK.UTF-8... done
zh_TW.UTF-8... done
zh_TW.UTF-8... done
Generation complete.
*** update-locale: Error: LANGUAGE ("zh_TW:zh") is not compatible with LANG (en_HK.UTF-8) <-- Error !!
command # cat /etc/profile (沒有增加任何東西)
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
fi
if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
export PATH
umask 022