LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 561|回复: 5

Another problem on locale[解决]

[复制链接]
发表于 2008-12-27 15:21:35 | 显示全部楼层 |阅读模式
原来是配置文件中的utf8写成了uft8.。。。





When I run 'locale',it  says something below:
  1. @supertux ~ $ locale
  2. locale: Cannot set LC_CTYPE to default locale: No such file or directory
  3. locale: Cannot set LC_MESSAGES to default locale: No such file or directory
  4. locale: Cannot set LC_ALL to default locale: No such file or directory
  5. LANG=zh_CN.uft8
  6. LC_CTYPE="zh_CN.uft8"
  7. LC_NUMERIC="zh_CN.uft8"
  8. LC_TIME="zh_CN.uft8"
  9. LC_COLLATE="zh_CN.uft8"
  10. LC_MONETARY="zh_CN.uft8"
  11. LC_MESSAGES="zh_CN.uft8"
  12. LC_PAPER="zh_CN.uft8"
  13. LC_NAME="zh_CN.uft8"
  14. LC_ADDRESS="zh_CN.uft8"
  15. LC_TELEPHONE="zh_CN.uft8"
  16. LC_MEASUREMENT="zh_CN.uft8"
  17. LC_IDENTIFICATION="zh_CN.uft8"
  18. LC_ALL=zh_CN.uft8
复制代码

I've searched  for  a lot of solutions but none worked for me.
My problem is Chinese cannot be  right displayed ,they looked something below:
  1. ç­å¾VPNè¿æ¥å»ºç«ï¼å·²ç­å¾ 2 ç§ã
  2. ç­å¾VPNè¿æ¥å»ºç«ï¼å·²ç­å¾ 4 ç§ã
  3. VPNè¿æ¥å»ºç«å®æã
复制代码

I've also installed fcitx with USE="truetype" and modified .xprofile,but  it doesn;t work.I guess it's because I've not set my locale properly.Sorry for my poor English but I really need your help : )

Here is my locale-gen:
  1. @supertux ~ $ cat /etc/locale.gen
  2. # /etc/locale.gen: list all of the locales you want to have on your system
  3. #
  4. # The format of each line:
  5. # <locale> <charmap>
  6. #en_US ISO-8859-1
  7. #en_US.UTF-8 UTF-8
  8. #ja_JP.EUC-JP EUC-JP
  9. #ja_JP.UTF-8 UTF-8
  10. #ja_JP EUC-JP
  11. #en_HK ISO-8859-1
  12. #en_PH ISO-8859-1
  13. #de_DE ISO-8859-1
  14. #de_DE@euro ISO-8859-15
  15. #es_MX ISO-8859-1
  16. #fa_IR UTF-8
  17. #fr_FR ISO-8859-1
  18. #fr_FR@euro ISO-8859-15
  19. #it_IT ISO-8859-1
  20. zh_CN.GB18030 GB18030  
  21. zh_CN.GBK GBK  
  22. zh_CN.UTF-8 UTF-8  
  23. zh_CN GB2312
复制代码

I manually add this file  to change my locale from "OSIX" to "zh_CN.utf8"
  1. @supertux ~ $ cat /etc/env.d/100i18n
  2. LC_ALL="zh_CN.uft8"
  3. LANG="zh_CN.uft8"
复制代码

Anyone who can give me some suggestions or help?Thanks a lot.
发表于 2008-12-27 16:28:08 | 显示全部楼层
我这也是时有发生
回复 支持 反对

使用道具 举报

发表于 2008-12-27 16:29:01 | 显示全部楼层
paste locale -a
回复 支持 反对

使用道具 举报

发表于 2008-12-27 16:54:42 | 显示全部楼层
晕~~~~~~~~

utf8

NOT

uft8
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-27 17:09:21 | 显示全部楼层
Post by Hosanna;1930535
晕~~~~~~~~

utf8

NOT

uft8


my god!  THX.
corrected it now and now locale looks like this:


  1. supertux ~ # locale
  2. LANG=zh_CN.utf8
  3. LC_CTYPE="zh_CN.utf8"
  4. LC_NUMERIC="zh_CN.utf8"
  5. LC_TIME="zh_CN.utf8"
  6. LC_COLLATE="zh_CN.utf8"
  7. LC_MONETARY="zh_CN.utf8"
  8. LC_MESSAGES="zh_CN.utf8"
  9. LC_PAPER="zh_CN.utf8"
  10. LC_NAME="zh_CN.utf8"
  11. LC_ADDRESS="zh_CN.utf8"
  12. LC_TELEPHONE="zh_CN.utf8"
  13. LC_MEASUREMENT="zh_CN.utf8"
  14. LC_IDENTIFICATION="zh_CN.utf8"
  15. LC_ALL=zh_CN.utf8
复制代码


locale -a

  1. supertux ~ # locale -a
  2. C
  3. POSIX
  4. zh_CN
  5. zh_CN.gb18030
  6. zh_CN.gbk
  7. zh_CN.utf8
复制代码


What should I do to enable Chinese input? Fcitx still doesn't work. Do I need to logout or restart X?
回复 支持 反对

使用道具 举报

发表于 2008-12-27 17:13:23 | 显示全部楼层
env-update
restart X
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表