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






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


          網站導航:
           

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

          Copyright © H2O

          主站蜘蛛池模板: 裕民县| 长葛市| 昌乐县| 平昌县| 宜城市| 利津县| 法库县| 东源县| 金平| 文山县| 双辽市| 宜宾市| 航空| 新乐市| 封丘县| 西充县| 教育| 和田市| 宽城| 呈贡县| 开阳县| 阳新县| 建瓯市| 安吉县| 岑巩县| 甘德县| 深泽县| 罗平县| 张家港市| 临海市| 克什克腾旗| 桦甸市| 华亭县| 门源| 巴中市| 玉树县| 屏东县| 惠安县| 天峨县| 迭部县| 大化|