GNU bug report logs - #48324
27.2; hexl-mode duplicates the UTF-8 BOM

Previous Next

Package: emacs;

Reported by: "R. Diez" <rdiezmail-emacs <at> yahoo.de>

Date: Sun, 9 May 2021 21:39:02 UTC

Severity: normal

Found in version 27.2

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: "R. Diez" <rdiezmail-emacs <at> yahoo.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, Andreas Schwab <schwab <at> linux-m68k.org>,
 48324 <at> debbugs.gnu.org
Subject: Re: bug#48324: 27.2; hexl-mode duplicates the UTF-8 BOM
Date: Mon, 10 May 2021 19:43:20 +0200
> Ah, so maybe I didn't use the exact recipe.  I did try hexl-mode as
> well as hexl-find-file, but maybe I missed something.  Could someone
> please post an exact recipe, step by step?

I'll try again:

- I created an empty file with Caja (the MATE Desktop file manager) named Test7.txt . That empty file is 0 bytes long.
- I then dragged the file to Emacs in order to open it.
The default encoding is utf-8-unix (visible on Emacs' status line).
- I pressed my keyboard shortcut for (eval-expression).
- I changed the encoding by manually evaluating this expression:
(set-buffer-file-coding-system 'utf-8-with-signature-dos)
- I then typed in the buffer for Text7.txt the characters "123".
- I saved the buffer with menu "File", option "Save".
- I ran in the minibuffer command hexl-mode, which gives me the hex view for that file:
ef bb bf 31 32 33 0d 0a
- I moved the cursor with the arrow keys to the byte with value "31".
- I ran in the minibuffer command hexl-insert-hex-char, in order to overwrite the 31 with a new value.
- I typed in the minibuffer the hex value "00" (a binary null) and pressed enter.
- In the hex view, the BOM is now duplicated.

Best regards,
  rdiez




This bug report was last modified 2 years and 322 days ago.

Previous Next


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