[Bug 896947] New: xemacs writes wrong file encoding
https://bugzilla.novell.com/show_bug.cgi?id=896947 https://bugzilla.novell.com/show_bug.cgi?id=896947#c0 Summary: xemacs writes wrong file encoding Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: i686 OS/Version: openSUSE 13.1 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: ralfixx@gmx.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0 Xemacs writes a file with the wrong encoding: latin-9 was requested (single byte umlauts), but utf-8 is written. If xemacs is started without site-file, the bug does not occur. The reason for the bug is in the Opensuse specific startup files in /usr/share/xemacs/site-packages/lisp/site-start.el (see below). Reproducible: Always Steps to Reproduce: - Start xemacs with the default language set to UTF-8 env LANG=de_DE.UTF-8 xemacs -q - Load a new file and specify the encoding differently C-u C-x C-f /tmp/nf.txt RET latin-9 RET - Modeline indicates "Latin-9" - Enter Umlauts äöü, save file. - Check saved file contents: file size should be 3 Actual Results: file size is 6, sile is saved as utf8 though latin-9 was requested when loading the file. Expected Results: file size should be 3, file written in single-byte encoding. The reason is in the Opensuse specific startup files in /usr/share/xemacs/site-packages/lisp/site-start.el which first loads /usr/lib/ispell/ispell-emacs-menu.el and then executes the (suse-set-coding-systems) function. Specifically the (copy-coding-system 'iso-8859-15 'iso-latin-9) in ispell-emacs-menu.el triggers the bug. If this is commented out, the bug does not occur. Also if (suse-set-coding-systems) is not invoked, the bug is not triggered. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=896947
https://bugzilla.novell.com/show_bug.cgi?id=896947#c1
Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=896947
https://bugzilla.novell.com/show_bug.cgi?id=896947#c2
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=896947
https://bugzilla.novell.com/show_bug.cgi?id=896947#c3
--- Comment #3 from Ralf Fassel
but I guess this latin9 is needed for some legacy applications?
It is used for plain text files originating from the late 20th century when utf-8-support was not yet a topic. The files are many, and up to now have worked just fine for us. (In reply to comment #2)
[...] The common standard is UTF-8 and nothing else.
*IF* xemacs supports different encodings *AND* it shows "Latin-9" in the modeline it should NOT write UTF8, regardless of what is considered "the standard".
IMHO the lisp function (suse-set-coding-systems) should be skipped/removed with new Xemacs.
Would be good enough for me... TNX R' -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=896947
https://bugzilla.novell.com/show_bug.cgi?id=896947#c4
Dr. Werner Fink
*IF* xemacs supports different encodings *AND* it shows "Latin-9" in the modeline it should NOT write UTF8, regardless of what is considered "the standard".
Why this? It would be a good starting point to convert files to a common world wide standard readable around the globe. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=896947
https://bugzilla.novell.com/show_bug.cgi?id=896947#c5
--- Comment #5 from Ailin Nemui
https://bugzilla.novell.com/show_bug.cgi?id=896947
https://bugzilla.novell.com/show_bug.cgi?id=896947#c6
--- Comment #6 from Ailin Nemui
https://bugzilla.novell.com/show_bug.cgi?id=896947
https://bugzilla.novell.com/show_bug.cgi?id=896947#c7
--- Comment #7 from Ralf Fassel
here's a further explanation:
latin-unity expects the names to be iso-8859-## but the calls to
(copy-coding-system 'iso-8859-15 'iso-latin-9)
effectively rename the iso-8859 coding systems to iso-latin. [...] removing the calls to copy-coding-system in ispell-emacs-menu would be sensible. note that this file is supplied by the ispell package. (however the site-start file loads it)
IMHO ispell should not rename the coding systems. The docs for copy-coding-system say: If you are using this function to create an alias, think again: Use `define-coding-system-alias' instead. Maybe an alias is sufficient? R' -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=896947
--- Comment #10 from Bernhard Wiedemann
http://bugzilla.novell.com/show_bug.cgi?id=896947
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=896947
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=896947
http://bugzilla.novell.com/show_bug.cgi?id=896947#c13
--- Comment #13 from Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com