使用sudo gedit ~/***/config 总有乱码~· [solved completely]

系统字体配置、中文显示和输入法问题
回复
x7x7
帖子: 66
注册时间: 2007-04-22 19:13

使用sudo gedit ~/***/config 总有乱码~· [solved completely]

#1

帖子 x7x7 » 2009-05-01 10:07

一直以来 使用sudo gedit ~/×××××/config (例如 sudo gedit ~/fcitx/config)打开文档 如果里面有中文 都会是乱码。 每次总得以管理员身份进入home 然后先开gedit 再拖动config文件到gedit 才能正确显示中文, 不知这个问题能有解决方法没有?求助~~~~

app》system tool》configuration editor》。。。。里面的encodings 已经添加了GB18030等中文编码 对于其他目录下得文档 直接双击可以正常显示中文字体 。所以应该跟这个没有关系吧?
另: 我的local是英文, 会有影响?
上次由 x7x7 在 2009-05-01 13:54,总共编辑 2 次。
头像
lll9p
帖子: 1806
注册时间: 2007-07-18 18:56
联系:

Re: 使用sudo gedit ~/***/config 总有乱码~

#2

帖子 lll9p » 2009-05-01 10:11

fcitx的config用的是GBK编码吧,选对编码就OK了。
我的小站imtho.com
3n6uv7 2vw <---- 332 ?语星火是么什
x7x7
帖子: 66
注册时间: 2007-04-22 19:13

Re: 使用sudo gedit ~/***/config 总有乱码~

#3

帖子 x7x7 » 2009-05-01 13:30

lll9p 写了:fcitx的config用的是GBK编码吧,选对编码就OK了。
恩 ~~问题解决
目前我只能这样
sudo gedit --encoding gbk ~/.fcitx/config

我在configuration Editor 里面那个encodings 添加GBK没有效果(不知道这样做是不是很傻?呵呵~~)只能按照上面的命令edit了
头像
jioyo源
帖子: 3476
注册时间: 2008-10-08 13:48

Re: 使用sudo gedit ~/***/config 总有乱码~

#4

帖子 jioyo源 » 2009-05-01 13:33

x7x7 写了:
lll9p 写了:fcitx的config用的是GBK编码吧,选对编码就OK了。
恩 ~~问题解决
目前我只能这样
sudo gedit --encoding gbk ~/.fcitx/config

我在configuration Editor 里面那个encodings 添加GBK没有效果(不知道这样做是不是很傻?呵呵~~)只能按照上面的命令edit了
:em11 用up把GBK移到最前面就可以了……还有把简体中文的编码都添加上……
--------------------------------------
论坛精华贴全集:http://forum.ubuntu.org.cn/viewtopic.php?f=48&t=199845
book:http://forum.ubuntu.org.cn/viewtopic.php?f=21&t=198286
x7x7
帖子: 66
注册时间: 2007-04-22 19:13

Re: 使用sudo gedit ~/***/config 总有乱码~

#5

帖子 x7x7 » 2009-05-01 13:49

jioyo源 写了:
x7x7 写了:
lll9p 写了:fcitx的config用的是GBK编码吧,选对编码就OK了。
恩 ~~问题解决
目前我只能这样
sudo gedit --encoding gbk ~/.fcitx/config

我在configuration Editor 里面那个encodings 添加GBK没有效果(不知道这样做是不是很傻?呵呵~~)只能按照上面的命令edit了
:em11 用up把GBK移到最前面就可以了……还有把简体中文的编码都添加上……
呵呵~~奇怪阿~我现在再一次把GBK添加到encodings 虽然置于最底端的位置(没有在最前面的位置) 但是通过普通的 sudo gedit ~/.fcitx/config 可以正常显示中文了~~~
:em06
ryebread
帖子: 74
注册时间: 2005-10-23 23:06

Re: 使用sudo gedit ~/***/config 总有乱码~· [solved completely]

#6

帖子 ryebread » 2009-09-25 17:16

使用sudo gconf-editor,在gedit-2中把GB2312编码加上就可以用sudo gedit 显示中文 了
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: 使用sudo gedit ~/***/config 总有乱码~· [solved completely]

#7

帖子 wangdu2002 » 2009-09-25 17:17

直接用Leafpad多省事,sudo aptitude install leafpad一键搞定之。 :em03
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
回复