Re: [DeepinUsers] Re: [FZH] gedit3的亂碼問題

13 views
Skip to first unread message

Zhang Cheng

unread,
Feb 13, 2012, 9:09:39 PM2/13/12
to deepi...@googlegroups.com, deep...@googlegroups.com
2012/2/13 rhy lei <maybe...@gmail.com>
gedit3乱码问题解决方法之一:
gsettings set org.gnome.gedit.preferences.encodings auto-detected "[ 'UTF-8','GB18030', 'GB2312', 'GBK', 'BIG5', 'CURRENT', 'UTF-16']"
gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "[ 'UTF-8','GB18030', 'GB2312', 'GBK', 'BIG5', 'CURRENT', 'UTF-16']"

非常感谢!不过这个设置还不太完整,最近有许多射手上的字幕都是utf-16le的。

我把上面的一封邮件的内容保存成文本文件,并且分别保存为gb18030、utf16le、utf16be、utf8,打包放在附件里,文件列表如下(无法保存为gb2312/gbk/big5,应该是这个文件中有超出这些字符集的字符):
$ tar tvf chinese-test.txt.tar.xz 
-rw-r--r-- stephen/stephen 2244 2012-02-14 09:33 chinese-gb18030.txt
-rw-r--r-- stephen/stephen 3026 2012-02-14 09:36 chinese-utf16be.txt
-rw-r--r-- stephen/stephen 3026 2012-02-14 09:36 chinese-utf16le.txt
-rw-r--r-- stephen/stephen 2967 2012-02-14 09:33 chinese-utf8.txt

在Deepin下,我尝试了一下,在没有对gedit做任何设置的情况下,这里面只有utf8的正常打开了,在做了如下设置之后,所有四个文件都正常识别了:
gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "['UTF-8', 'GB2312', 'GBK', 'GB18030', 'UTF-16LE', 'UTF-16BE', 'ucs-bom', 'latin1']"
gsettings set org.gnome.gedit.preferences.encodings auto-detected "['UTF-8', 'GB2312', 'GBK', 'GB18030', 'UTF-16LE', 'UTF-16BE', 'ucs-bom', 'latin1']"

我们会考虑在下一次发行时,在中文版的ISO默认做上面的设置。

前面有人问我要我的vim的设置,这里顺便也贴一下:
set encoding=utf8
set fileencodings=utf8,gb2312,gbk,gb18030,utf-16le,utf-16be,ucs-bom,latin1



--
Best Regards,
Cheng

chinese-test.txt.tar.xz
Reply all
Reply to author
Forward
0 new messages