Debian / Ubuntu ---support UTF-8 locale/encoding

          Posted on 2013-10-07 02:30 H2O 閱讀(381) 評論(0)  編輯  收藏
          Errors info is:
                                  
          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

          Because you don't install UTF-8 support ,so that you can do this bellow to solved this problem:
          # for english
          apt-get -y install language-pack-en-base
          # for chinese
          apt-get install -y language-pack-zh-hans
          apt-get install -y language-pack-zh-hans-base
          apt-get install -y language-pack-zh-hant - translation
          apt-get install -y language-pack-zh-hant-base

          # if you wan't to support others you can search languages.
          apt-cache search language-pack ,
          so that you can get the language you want,remember the package name and install it to be okay.

          # if you want set default encoding for system, you can edit /etc/environment

          vi /etc/environment

          # add content as bellow
          LANG="zh_CN.UTF-8"
          LANGUAGE="zh_CN.UTF-8:zh_CN.GB2312:zh_CN"
          SUPPORTED="zh_CN.UTF-8:zh_CN:zh"
          SYSFONT="lat0-sun16"
          SYSFONTACM="8859-15"

          #
          dpkg-reconfigure locales


          # reboot or let it
          come into force now.

          source /etc/environment # take effect now.
          reboot # after you reboot machine ,default encoding to be what you edited.
          vim /etc/default/locale 其中改為zh_CN
          #check default encoding you can use a simple command.

          date






          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           

          posts - 0, comments - 21, trackbacks - 0, articles - 101

          Copyright © H2O

          主站蜘蛛池模板: 昆明市| 宿州市| 呈贡县| 泽普县| 杭州市| 泰顺县| 泸定县| 娄烦县| 梁山县| 清镇市| 贵州省| 海丰县| 远安县| 芜湖市| 大石桥市| 图们市| 连云港市| 克什克腾旗| 南丹县| 建水县| 枣强县| 台湾省| 上蔡县| 天津市| 正蓝旗| 昌宁县| 山阴县| 博罗县| 绥江县| 乃东县| 宁安市| 高要市| 台北市| 永年县| 宝应县| 岑溪市| 贵港市| 潜江市| 海口市| 宣恩县| 兴安盟|