[FZH] gedit3的亂碼問題

alick alick9188 at gmail.com
Fri Feb 3 12:16:30 UTC 2012


记 bugzilla He Rui 上传的小说文件为 f1, 注意到它是CRLF行尾,dos2unix 后
的文件
记为 f2。记 test_gbk.txt GBK 的诗歌文件为 poem。


我的系统是 Fedora 16, LANG=zh_CN.UTF-8

我发现如下设置时

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

gedit 能正常识别 f2 和 poem 为 GBK,却不能正常识别 f1:会认为 f1 是 UTF-8 且
缺少罕见字体,短时间内卡死。

当做如下设置时

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

gedit 能正常识别 f1, f2, 和 poem。

我平时用 vim,以上文件都正常识别,自动检测编码配置为:

set fileencodings=ucs-bom,utf-8,cp936,gb18030,latin

我还用 Firefox 9 直接打开上述文件,发现都识别为 UTF-8,显示乱码。不过
Firefox
中可以方便地改变字符编码。

-- 
alick
Fedora 16 (Verne) user
https://fedoraproject.org/wiki/User:Alick


More information about the Chinese mailing list