GNOME Bugzilla – Bug 669525
gedit cannot guess GB family encodings correctly
Last modified: 2013-11-09 20:31:12 UTC
Created attachment 206948 [details] the test case The test file, gbk.txt, is from an attachment of the following (old) bug report. https://bugzilla.redhat.com/show_bug.cgi?id=576047 My environment $ gedit --version gedit - Version 3.2.6 $ gsettings get org.gnome.gedit.preferences.encodings auto-detected ['UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16'] $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= $ cat /etc/redhat-release Fedora release 16 (Verne) My test procedure LANG=zh_CN.gbk gedit gbk.txt #FAIL LANG=zh_CN.gb18030 gedit gbk.txt #FAIL gedit --encoding gbk gbk.txt #PASS, but no guess here I also write code to do essentially same testing inside document-output-stream.c. It is a patch to git version I just cloned. It is the first time I submit a patch, please forgive me in case there are mistakes.
Created attachment 206949 [details] [review] the patch for document-output-stream.c
Should be fixed with a more recent gedit version.