zoukankan      html  css  js  c++  java
  • [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,始终让人无法了解。。。

  • 相关阅读:
    深入理解HTTP协议及原理分析
    如何提高php应用的性能?
    PHP的网站主要攻击方式有哪些?
    五种常见的 PHP 设计模式
    排序算法之插入排序类
    排序算法之交换排序类
    Redis之Zset
    Redis之Set
    Redis之List
    Redis之Hash
  • 原文地址:https://www.cnblogs.com/hugetong/p/6782182.html
Copyright © 2011-2022 走看看