[FZH] gedit3的亂碼問題

alick alick9188 at gmail.com
Fri Feb 3 11:03:07 UTC 2012


于 2012年02月03日 18:47, Ma Xiaojun 写道:
> 我的測試環境是Fedora 16
> 
> 我發現,下面這個原Fedora 13的亂碼bug,在Fedora 16上仍然存在,但是gedit2變成了gedit3。原報告者上傳上的是一篇中文的小說。
> https://bugzilla.redhat.com/show_bug.cgi?id=576047
> 
> #1 PASS
> LANG=en_US.utf8 gedit --encoding gbk file.txt
> #2 FAIL
> LANG=zh_CN.gbk gedit file.txt
> LANG=zh_CN.gb18030 gedit file.txt
> #3 FAIL
> LANG=zh_CN.utf8 gedit file.txt
> 
> 而我自己搞一個的簡單的test case
> http://dl.dropbox.com/u/45139465/test_gbk.txt
> 
> #2可以通過了,#3依然失敗。
> 失敗的原因都是gedit選擇了錯誤的iso-8859-12編碼。
> 
> 如果檢測順序是,如我在CentOS 5.5的gedit2上,是3個都可以通過的,包括更容易判斷錯誤的那個小說。
> utf8
> current
> gbk/gb18030 (用戶自己配置,或者系統根據zh_CN自動產生)
> iso-8859-12
> 
> 但是gedit3,原來改gconf的地方消失了,不知道如何自己配置檢測順序,也不知道小說為什麽在#2會出錯。
> 
gconf 被 dconf 取代了,gconftool-2 被 gsettings 取代了。大概在这里:

$ gsettings list-recursively  org.gnome.gedit.preferences.encodings
org.gnome.gedit.preferences.encodings auto-detected ['UTF-8', 'CURRENT',
'ISO-8859-15', 'UTF-16']
org.gnome.gedit.preferences.encodings shown-in-menu ['BIG5', 'GB18030',
'GBK', 'GB2312', 'UTF-8', 'ISO-8859-1']

我这里也不能自动识别 GBK 编码,我猜需要把 GBK 加到 auto-detected 里面,
尚未测试。

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


More information about the Chinese mailing list