After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647935 - Autodetect file encoding
Autodetect file encoding
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-16 12:51 UTC by techtonik
Modified: 2012-08-03 08:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description techtonik 2011-04-16 12:51:13 UTC
Gedit suxx as a default viewer on Ubuntu, because it fails to detect proper encoding of text files. The autodetection code can be found in any open source browser.
Comment 1 Ma Hsiao-chun 2012-04-26 03:38:47 UTC
*** Bug 669448 has been marked as a duplicate of this bug. ***
Comment 2 André Klapper 2012-08-02 09:36:04 UTC
Please provide a testcase (as it works in many cases), and please provide a link to "autodetection code can be found in any open source browser."
Comment 3 Ma Hsiao-chun 2012-08-02 11:59:34 UTC
https://raw.github.com/maxiaojun/gedit3-encoding-helper/master/test_gbk.txt

Try it with Gedit and Kate, you should notice the difference.
Comment 4 Ignacio Casal Quinteiro (nacho) 2012-08-02 13:38:52 UTC
Please provide your language, and please check if the encoding list is correct as this might be a language which can be found in the open dialog.
Comment 5 Ma Hsiao-chun 2012-08-02 14:47:04 UTC
Check Bug 669448 for more information.
We've done some discussions previously.
I mark my own bug as duplicate because this one is reported earlier.

This bug is about AUTO detection.
Normal users do not know what is encoding.
The ability to select encoding before or after opening text documents won't fix this bug.
Comment 6 Ignacio Casal Quinteiro (nacho) 2012-08-02 18:30:44 UTC
So again as you say in the previous bug the list is:
['UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']
This list is set by the chinese translator. I do not know which one is the correct so we rely in the translators. Please contact your translator to comment on this bug and try to fix the translation.
Comment 7 Ma Hsiao-chun 2012-08-03 05:01:50 UTC
I haven't found such string in:
http://l10n.gnome.org/POT/gedit.master/gedit.master.zh_CN.po
Comment 8 Ignacio Casal Quinteiro (nacho) 2012-08-03 07:35:54 UTC
So there it is the bug. For some reason that string is not detected to be translated. André any idea about this?

http://git.gnome.org/browse/gedit/tree/data/org.gnome.gedit.gschema.xml.in.in#n224
Comment 9 Ignacio Casal Quinteiro (nacho) 2012-08-03 08:42:19 UTC
I just fixed this problem:
http://git.gnome.org/browse/gedit/commit/?id=9ed68c4ec0f8ad869f2a28c5fd175caaf312daaf

Please poke your translator so they translate the encodings for your specific language correctly.