gnome3 中gedit乱码如何改

系统字体配置、中文显示和输入法问题
头像
monk
帖子: 19507
注册时间: 2010-01-28 10:45

Re: gnome3 中gedit乱码如何改

#16

帖子 monk » 2011-05-24 0:17

指定编码打开就没事

代码: 全选

gedit --encoding=GB2312 蛋疼.txt
:em06

*********宁静致远*********
如果我说的有什么不对,请看签名第一行
长头发的和尚
帖子: 12134
注册时间: 2008-01-11 17:02

Re: gnome3 中gedit乱码如何改

#17

帖子 长头发的和尚 » 2011-05-24 11:59

monk 写了:指定编码打开就没事

代码: 全选

gedit --encoding=GB2312 蛋疼.txt
:em06
找到了 :em11
你往幸福的方向挥挥手,从此我便追随你永不回头。
scoky
帖子: 99
注册时间: 2007-07-21 9:12

Re: gnome3 中gedit乱码如何改

#18

帖子 scoky » 2011-05-24 21:13

代码: 全选

gsettings set org.gnome.gedit.preferences.encodings auto-detected "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"

代码: 全选

gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"
上次由 scoky 在 2011-05-24 21:17,总共编辑 1 次。
头像
qy117121
论坛版主
帖子: 50587
注册时间: 2007-12-14 13:40
系统: Winbuntu
来自: 志虚国乌由市
联系:

Re: gnome3 中gedit乱码如何改

#19

帖子 qy117121 » 2011-05-24 21:16

楼上的方法好 :em11
渠月 · QY   
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu

邮箱 chuan@ubuntu.org.cn
头像
xyuzu3
帖子: 81
注册时间: 2010-05-01 10:03

Re: gnome3 中gedit乱码如何改

#20

帖子 xyuzu3 » 2011-05-26 22:33

Boneflame 写了:
xyuzu3 写了:网上找到的解决方案 实验可行
问题解决:

step 1. 安装dconf-editor

sudo apt-get install dconf-tools

step2. 加入GB18030编码

->输入命令:dconf-editor

->org->gnome->gedit->preferences->encodings

->auto-detected的value项中加入’GB18030′,写在第一位;

->show-in-menu的value项中加入’GB18030′,写在第一位

->hava fun~
还是乱码..... :em20


我一般都这样..

代码: 全选

iconv -f GB18030 -t UTF8 <文件名> -o <文件名>
不会吧 我的都好了啊 注销试试
wk8910
帖子: 90
注册时间: 2009-08-07 9:28

Re: gnome3 中gedit乱码如何改

#21

帖子 wk8910 » 2011-06-13 10:34

18楼真人才
wanzihrg
帖子: 223
注册时间: 2008-03-15 10:34

Re: gnome3 中gedit乱码如何改

#22

帖子 wanzihrg » 2011-06-13 22:47

scoky 写了:

代码: 全选

gsettings set org.gnome.gedit.preferences.encodings auto-detected "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"

代码: 全选

gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"

顶!
头像
qy117121
论坛版主
帖子: 50587
注册时间: 2007-12-14 13:40
系统: Winbuntu
来自: 志虚国乌由市
联系:

Re: gnome3 中gedit乱码如何改

#23

帖子 qy117121 » 2011-06-13 22:52

其实我发现这样改了之后会有问题,
用gedit打开utf8编码的文件后,修改保存,会保存为gb18030的,而不是保存为utf8。。。
渠月 · QY   
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu

邮箱 chuan@ubuntu.org.cn
Mazenvoy
帖子: 306
注册时间: 2010-04-02 21:17

Re: gnome3 中gedit乱码如何改

#24

帖子 Mazenvoy » 2011-06-14 0:07

qy117121 写了:其实我发现这样改了之后会有问题,
用gedit打开utf8编码的文件后,修改保存,会保存为gb18030的,而不是保存为utf8。。。
那是自然的,他把gb18030编码放到了第一个,所以默认就是gb18030
头像
Smallant
帖子: 90
注册时间: 2011-05-27 8:04
来自: 太原理工大学

Re: gnome3 中gedit乱码如何改

#25

帖子 Smallant » 2011-06-14 17:06

qy117121 写了:其实我发现这样改了之后会有问题,
用gedit打开utf8编码的文件后,修改保存,会保存为gb18030的,而不是保存为utf8。。。
与流行的教程的做法略有不同,我是把gb18030加在uft8后面的,乱码也消除了。而且默认保存的时候仍然是uft8。不过我先在用的还是Ubuntu 11.04 的unity,不知道这个方法是否适用于Gnome3。
玄原
帖子: 92
注册时间: 2007-12-16 21:59

Re: gnome3 中gedit乱码如何改

#26

帖子 玄原 » 2011-06-14 22:12

直接用leafpad就完事了,搞这么麻烦干什么!
如果要编程的话就用gvim,gedit----不伦不类,还复杂!!!
cuizaixu_jingzhe
帖子: 10
注册时间: 2011-06-16 11:08

Re: gnome3 中gedit乱码如何改

#27

帖子 cuizaixu_jingzhe » 2011-06-16 11:12

大家好!我在终端里输入18楼的命令:
gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"
显示下面一行,为什么啊?谢谢了
No such schema 'org.gnome.gedit.preferences.encodings'
头像
rabbit_52
帖子: 140
注册时间: 2010-05-09 9:03
联系:

Re: gnome3 中gedit乱码如何改

#28

帖子 rabbit_52 » 2011-06-18 12:40

scoky 写了:

代码: 全选

gsettings set org.gnome.gedit.preferences.encodings auto-detected "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"

代码: 全选

gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"

正解,dconf-editor也不用装了!谢谢
Blog
注册Dropbox!同涨空间 ^_^
头像
月下叹逍遥
论坛版主
帖子: 33994
注册时间: 2010-10-07 14:23
系统: Archdows10
来自: 某系某星某洲某国某省某市
联系:

Re: gnome3 中gedit乱码如何改

#30

帖子 月下叹逍遥 » 2011-06-21 14:58

K系太纠结了……
geany很爽……
浮生七十今三十,从此凄惶未可知
回复