命令行界面中文无法正常显示
Tofloor
poster avatar
Cherles
deepin
2013-11-21 19:13
Author
终端可以正常显示的中文字符,在Ctrl+Alt+F1切换到tty之后,无法显示,都是菱形乱码。
Reply Favorite View the author
All Replies
electricface
deepin
2013-11-21 19:22
#1
是这样的
所以我在~/.bashrc 里面加上了这样一段,判断是否为tty,然后设定语言为英文。
  1. if [[ "$(tty)" =~ "/dev/tty" ]];then
  2.      export LANGUAGE=en_US
  3.      export LC_TIME="en_US.UTF-8"
  4.      export DISPLAY=:0
  5.      export ISTTY=1
  6. fi
Copy the Code
核心命令是
export LANGUAGE=en_US
export DISPLAY=:0

还有一种显示中文的办法安装 fcitx-frontend-fbterm
  1. sudo apt-get install fcitx-frontend-fbterm -y
  2. fcitx-fbterm-helper -l
Copy the Code
Reply View the author
cxbii
deepin
2013-11-21 19:25
#2
Reply View the author