[daily][archlinux] 本地字符乱码, 无法显示中文
一:
突然有一天,Konsole里边看见的中文文件名的文件,就变成了乱码。thunderbird存到本地的附件,文件名也变成了乱码。
在X下查看locale,内容如下: 手动设置了之后也不对。 但是在字符模式下就是正常的。
/home/tong [tong@T7] [16:24] > locale locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=mn_CN.UTF-8 LC_CTYPE=mn_CN.UTF-8 LC_NUMERIC="mn_CN.UTF-8" LC_TIME="mn_CN.UTF-8" LC_COLLATE="mn_CN.UTF-8" LC_MONETARY="mn_CN.UTF-8" LC_MESSAGES="mn_CN.UTF-8" LC_PAPER="mn_CN.UTF-8" LC_NAME="mn_CN.UTF-8" LC_ADDRESS="mn_CN.UTF-8" LC_TELEPHONE="mn_CN.UTF-8" LC_MEASUREMENT="mn_CN.UTF-8" LC_IDENTIFICATION="mn_CN.UTF-8" LC_ALL= /home/tong [tong@T7] [16:24] > localectl set-locale LANG=en_US.UTF-8 /home/tong [tong@T7] [16:25] > locale locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=mn_CN.UTF-8 LC_CTYPE=mn_CN.UTF-8 LC_NUMERIC="mn_CN.UTF-8" LC_TIME="mn_CN.UTF-8" LC_COLLATE="mn_CN.UTF-8" LC_MONETARY="mn_CN.UTF-8" LC_MESSAGES="mn_CN.UTF-8" LC_PAPER="mn_CN.UTF-8" LC_NAME="mn_CN.UTF-8" LC_ADDRESS="mn_CN.UTF-8" LC_TELEPHONE="mn_CN.UTF-8" LC_MEASUREMENT="mn_CN.UTF-8" LC_IDENTIFICATION="mn_CN.UTF-8" LC_ALL=
locale的值。是在/etc/locale.conf中设置的。同时参见 systemd-firstboot 以及 systemd-localed.service .
二:
很显然,通过这种现象,一定是X搞得鬼,然后发现了,我上次顺手改了这个配置:
改回去,又重新设吧设吧,就好了。。。。
伟大的KDE,始终让人无法了解。。。