LinuxSir.cn,穿越时空的Linuxsir!

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

究竟应该把编码设为什么?

[复制链接]
发表于 2005-2-6 18:08:15 | 显示全部楼层 |阅读模式
在slackware下,用gb2312呢,还是gbk,还是utf8。精华贴都有不同的设置,到底他们之间有什么不同?
应该用哪个最好?是不是在~./profile里设置呢,还是在l/etc/profile.d/ang.sh里。
utf8 怎样设置呢?
这些是困扰我的一个大问题。
发表于 2005-2-6 18:22:14 | 显示全部楼层
不妨参考我的lang.sh,我是英文界面,中文显示和输入都没问题

  1. #!/bin/sh
  2. # Set the system locale.  (no, we don't have a menu for this ;-)
  3. # For a list of locales which are supported by this machine, type:
  4. #   locale -a

  5. # en_US is the Slackware default locale:
  6. [b]export LANG=en_US
  7. export G_BROKEN_FILENAMES=1
  8. export LC_CTYPE="zh_CN.gbk"[/b]

  9. # 'C' is the old Slackware (and UNIX) default, which is 127-bit
  10. # ASCII with a charmap setting of ANSI_X3.4-1968.  These days,
  11. # it's better to use en_US or another modern $LANG setting to
  12. # support extended character sets.
  13. #export LANG=C

  14. # There is also support for UTF-8 locales, but be aware that
  15. # some programs are not yet able to handle UTF-8 and will fail to
  16. # run properly.  In those cases, you can set LANG=C before
  17. # starting them.  Still, I'd avoid UTF unless you actually need it.
  18. #export LANG=en_US.UTF-8

  19. # Another option for en_US:
  20. #export LANG=en_US.ISO8859-1

  21. # One side effect of the newer locales is that the sort order
  22. # is no longer according to ASCII values, so the sort order will
  23. # change in many places.  Since this isn't usually expected and
  24. # can break scripts, we'll stick with traditional ASCII sorting.
  25. # If you'd prefer the sort algorithm that goes with your $LANG
  26. # setting, comment this out.
  27. [b]export LC_COLLATE=C[/b]

  28. # End of /etc/profile.d/lang.sh
复制代码
回复 支持 反对

使用道具 举报

发表于 2005-2-6 18:23:46 | 显示全部楼层
我一直用gbk,觉得是目前比较好的选择。
locale在几个地方都可以设置,没有一定之规,我还在~/.xinitrc里设置呢。在 /etc/profile.d/lang.sh 里是全局设置,所有用户都可以用,当然你也可以在每个用户的配置文件里面修改它。这就是linux系统的灵活之处。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-6 18:55:30 | 显示全部楼层
Post by dreamawake
不妨参考我的lang.sh,我是英文界面,中文显示和输入都没问题

什么意思呢?莫非你的kde都是英文的?
关键想解决gthumb乱码的问题
回复 支持 反对

使用道具 举报

发表于 2005-2-6 19:39:02 | 显示全部楼层
我不用kde和gnome的。
kde中文界面要装kdei里的中文语言包。gthumb汉化以后应该不会有乱马了吧(以前用gnome时就没问题)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-6 20:50:00 | 显示全部楼层
只有gthumb有问题,而gnome的文件管理器等没有乱码。奇怪。
回复 支持 反对

使用道具 举报

发表于 2005-2-6 22:43:35 | 显示全部楼层
那建议你用gqview吧,很不错的,也不用依赖gnome。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-7 17:11:55 | 显示全部楼层
假如用gqview,不如用kde的那个了。
gthumb不错,gnome中最好的软件。其他的都很废
回复 支持 反对

使用道具 举报

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

本版积分规则

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