From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rommerskirchen Heinrich Newsgroups: gmane.emacs.bugs Subject: Emacs doesn't write with the encoding it used for reading Date: Fri, 5 Apr 2002 14:59:54 +0200 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <2D8309604314D41187850008C7BB0CB24A9913@MCHH248E> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: main.gmane.org 1018011790 16867 127.0.0.1 (5 Apr 2002 13:03:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 5 Apr 2002 13:03:10 +0000 (UTC) Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16tTN0-0004Np-00 for ; Fri, 05 Apr 2002 15:03:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16tTMv-0004N0-00; Fri, 05 Apr 2002 08:03:05 -0500 Original-Received: from beamer.mchh.siemens.de ([194.138.158.163]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16tTK2-00046j-00 for ; Fri, 05 Apr 2002 08:00:06 -0500 Original-Received: from moody.mchh.siemens.de (mail2.mchh.siemens.de [194.138.158.226]) by beamer.mchh.siemens.de (8.9.3/8.9.3) with ESMTP id OAA17844 for ; Fri, 5 Apr 2002 14:59:53 +0200 (MET DST) Original-Received: from mchh246e.demchh201e.icn.siemens.de ([139.21.200.56]) by moody.mchh.siemens.de (8.9.1/8.9.1) with ESMTP id OAA05447 for ; Fri, 5 Apr 2002 14:59:41 +0200 (MET DST) Original-Received: by MCHH246E with Internet Mail Service (5.5.2653.19) id ; Fri, 5 Apr 2002 15:00:01 +0200 Original-To: "'bug-gnu-emacs@gnu.org'" X-Mailer: Internet Mail Service (5.5.2653.19) Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:416 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:416 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.2.1 (i386-msvc-nt4.0.1381) of 2002-03-19 on buffy configured using `configure --with-msvc (12.00)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: DEU locale-coding-system: iso-latin-1 default-enable-multibyte-characters: t If a file contains a mixture of German DOS-encoded text (cp850) and German Windows-encoded text it is read as latin1 but emacs will not write it back as latin1. Simple Example: A file contains the 4 Bytes 0xE4 0x84 0x0D 0x0A. (Umlaut-a in DOS and Windows encoding followed by CR LF). Emacs unter German Windows reads it as latin1. If I now type a character and delete it again, so that I have the same content, emacs will not write it back as latin1 but instead suggests a few encodings with default utf8. Saving with utf8 gives a file with 6 bytes, which emacs again reads as latin1, but doesn't write as latin1, choosing again utf8 gives a file with 10 bytes and this doesn't change anymore, but contains neither of the original two characters. Saving the original file (4 bytes) with raw-text gives a file with 5 bytes which doesn't change anymore on reading and writing (emacs uses encoding raw-text-dos), it contains the original bytes plus a spurious \201 (Umlaut-u in DOS encoding) Recent input: C-x C-f / t e m p / x x SPC C-x C-s C-g Recent messages: (C:\bin\emacs-21.2\bin\emacs.exe -q --no-site-file) For information about the GNU Project and its goals, type C-h C-p. Loading image...done Loading view...done byte-code: Quit Loading emacsbug...done Regards Heinz