GNU bug report logs - #79316
End-of-line problems with text files inside zip files

Previous Next

Package: emacs;

Reported by: "R. Diez" <rdiez-2006 <at> rd10.de>

Date: Tue, 26 Aug 2025 07:31:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "R. Diez" <rdiez-2006 <at> rd10.de>
To: bug-gnu-emacs <at> gnu.org
Subject: End-of-line problems with text files inside zip files
Date: Tue, 26 Aug 2025 09:29:48 +0200
[Message part 1 (text/plain, inline)]
Hi all:

I am using Emacs 29, and I have built Emacs myself on Ubuntu 22.04. But I have had this issue with older Emacs and Ubuntu versions too.

I have attached a zip file with 3 text files:

test1.txt - with encoding utf-8-with-signature-dos
test2.xml - with encoding utf-8-dos
test3.xml - with encoding utf-8-dos too

If if unpack the zip file in the shell and open those files with Emacs, everything is fine.

However, if you open the zip file with Emacs, and then open those text files inside, there are end-of-line problems:

test1.txt shows encoding utf-8-with-signature-unix. That is, it loses the DOS CR LF line terminators.

test2.xml has a similar problem. The encoding is then shown as utf-8-unix.

test3.xml has the same problem, but each line shows a ^M marker at the end. The only difference between test2.xml and test3.xml is that the latter starts with this line:

<?xml version="1.0" encoding="UTF-8"?>

This problem is probably known, but I could not find a description or a workaround on the Internet. Or maybe I did not come up with the right search keywords.

Regards,
  rdiez
[test.zip (application/zip, attachment)]

This bug report was last modified 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.