Debian8 终端中文乱码 显示为菱形小方块

我是联网更新安装的 图形界面kde 图形界面中文显示没有问题
http://7xsc47.com1.z0.glb.clouddn.com/抓图3.png

查看编码方式:
http://7xsc47.com1.z0.glb.clouddn.com/抓图4.png

我选择的缺省中文编码是zh_CN.UTF-8, 桌面环境kde,桌面环境中文显示一切正常。

但是终端之下,显示就想这样下面,还没有找到解决的方法。图片是网上找到的,乱码的地方显示菱形方块
http://7xsc47.com1.z0.glb.clouddn.com/index.png

自己试过把编码改成英文,en_US.UTF-8,终端全部显示英文,但是图形界面下的英文看起来不舒服,缺省编码设置为中文至少不影响平时用

现在希望能单独配置用户
在debian wiki上找到帮助

[quote]
Now, optionally, edit /etc/profile as follows:

Run locale -a to get a list of the locale names suitable for use in environment variables. Note that the spellings are different from the ones presented in the dpkg-reconfigure list.

Add a line like this to your /etc/profile file:

[code] : ${LANG:=de_DE.iso88591}; export LANG[/code]

where de_DE.iso88591 is the locale you want to use as a default. If you have tcsh or csh users, create a file named /etc/csh/login.d/lang with the following content:

[code] if (! $?LANG) setenv LANG de_DE.iso88591[/code]

This will only set LANG if it was not previously defined, for example by ssh. Unfortunately, this won't affect users who login with xdm, gdm, etc. [/quote]

/etc/profile是对所有用户起作用的环境变量(environment variables),我的使用习惯是root用户登陆终端,自己创建的普通用户登陆图形界面,需要超级权限的时候使用命令su。

这样的话,在**/root/.bashrc**添加这样一行代码是不是可以解决问题呢?

#locale
 : ${LANG:=en_US.UTF-8}; export LANG
 if (! $?LANG) setenv LANG de_DE.iso88591

附上debian官方wiki关于locale的链接
wiki.debian.org/Locale#Standard

由于上一次系统挂掉就是动了/etc/profile,稀里糊涂的输入所有的命令都报同样一个错误提示,
现在来问一下这样能不能行呢,求解答

[quote=“eexpress”]
只能fbterm了。
记得加入video组和设置中文字体。[/quote]

[quote=“nickdgd”]zhcon太旧了
推荐用fbterm,源里有[/quote]

参考
forum.ubuntu.org.cn/viewtopic.php?f=8&t=473888
forum.ubuntu.org.cn/viewtopic.php?f=8&t=474866

viewtopic.php?t=381585
viewtopic.php?t=246905
viewtopic.php?t=318927
viewtopic.php?t=280873
viewtopic.php?t=371281

咦,我在Archlinux下面,保证 /etc/locale.conf 里面是英文环境,~/.xprofile里面是中文环境,就能做到图形界面显示中文,命令界面显示英文。

Debian下面没有类似的设置吗?

你這個 終端 是指 tty1 ~ tty6 的 Console ?
還是 tty7 的 terminal ?
給你的建議 不同

[quote=“terbyrap”]咦,我在Archlinux下面,保证 /etc/locale.conf 里面是英文环境,~/.xprofile里面是中文环境,就能做到图形界面显示中文,命令界面显示英文。

Debian下面没有类似的设置吗?[/quote]

debian语言环境有单独配置文件 /etc/default/locale
我设置的默认中文,还没试环境变量

[quote=“poloshiao”]

你這個 終端 是指 tty1 ~ tty6 的 Console ?
還是 tty7 的 terminal ?
給你的建議 不同[/quote]

tty1-6,tty7的terminal显示正常,上面贴出来正常显示中文的就是我电脑上截的图

如果是 tty1 ~ tty6 console

要顯示中文
參見

有問題 再貼文

如果 只需顯示英文
unix.stackexchange.com/questions … fter-reboo