LinuxSir.cn,穿越时空的Linuxsir!

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

求助乱码

[复制链接]
发表于 2006-4-20 11:57:01 | 显示全部楼层 |阅读模式
装了ubuntu 6.04后,在eclipse和oracle中中文显示都是乱码,我猜可能是因默认是utf-8的原因,但我不知道该怎么改,在/etc/environment中将utf8改为gbk也不行!请高手帮忙!
 楼主| 发表于 2006-4-20 13:28:55 | 显示全部楼层
在其他程序中,中文可以正常显示。就是在eclipse和oracle中会乱码!请高手不吝赐教!
回复 支持 反对

使用道具 举报

发表于 2006-4-20 22:17:09 | 显示全部楼层
jdk字体问题,到论坛里找旧帖子,很多的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-21 15:48:50 | 显示全部楼层
应该不是jdk的问题吧,export LANG=GB18030,export LC_ALL=GB18030,再用locale查会出现错误的信息
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-21 16:19:06 | 显示全部楼层
修改了 /etc/environment
将utf-8改为gb18030后,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
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-22 17:36:54 | 显示全部楼层
帮忙啊!!!!!
回复 支持 反对

使用道具 举报

发表于 2006-4-22 17:42:46 | 显示全部楼层
Post by yongjin
应该不是jdk的问题吧,export LANG=GB18030,export LC_ALL=GB18030,再用locale查会出现错误的信息



运行一下locale-gen看看.
回复 支持 反对

使用道具 举报

发表于 2006-4-23 13:46:08 | 显示全部楼层
你就听我的,是jdk字体问题。我在mdv版回答过这个问题,自己去搜搜。
jdk使用自己的字体方案。除非装了jdk里面配置的默认字体。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-28 15:02:44 | 显示全部楼层
修改了jdk1.5.0_6的字体一样不行还是乱码,还有locale-gen的命令没有用啊, 各位大哥还有什么好办法!?
回复 支持 反对

使用道具 举报

发表于 2006-4-29 17:06:47 | 显示全部楼层
你的jdk字体配置是怎么配的?
我用uming,配置文件如下:
  1. # fontconfig.properties        2005-11-10
  2. #
  3. # Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  4. #
  5. # Version
  6. version=1
  7. # Component Font Mappings
  8. serif.plain.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  9. serif.bold.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  10. serif.italic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  11. serif.bolditalic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  12. sansserif.plain.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  13. sansserif.bold.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  14. sansserif.italic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  15. sansserif.bolditalic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  16. monospaced.plain.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  17. monospaced.bold.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  18. monospaced.italic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  19. monospaced.bolditalic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  20. dialog.plain.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  21. dialog.bold.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  22. dialog.italic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  23. dialog.bolditalic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  24. dialoginput.plain.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  25. dialoginput.bold.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  26. dialoginput.italic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  27. dialoginput.bolditalic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  28. dialoginput.bolditalic.zh-1=-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
  29. # Search Sequences
  30. sequence.allfonts=zh-1
  31. # Exclusion Ranges
  32. # Font File Names
  33. filename.-misc-ar pl shanheisun uni-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0=/usr/share/fonts/truetype/arphic/uming.ttf
  34. # AWT X11 font paths
  35. awtfontpath.zh-1=/usr/share/fonts/truetype/arphic/
复制代码
另外,其它多余的properties要删除。

还有,java -version是jdk1.5.0_06吧
回复 支持 反对

使用道具 举报

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

本版积分规则

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