Friday, February 8, 2008

Putty终端乱码解决方案

Putty終端亂碼問題

export LANG=C

in the putty window before launching your app, it will set your locale to "C". Strings will then be displayed correctly in putty. The default locale assumes that your terminal application can handle UTF-8, which is causing the problem in putty.


問題描述﹕
當打開一個終端后﹐執行某些命令﹐如"setup" , "man一些指令"﹐"一些文字界面下的圖形工具"
的時候﹐出面亂碼的情況.


解決辦法: 設置一下環境變量 "LANG"
1. #locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_M
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
2. #export LANG=C
3. #locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_M
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

No comments: