all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: meta1729 <meta1729@gmail.com>
Cc: 64253@debbugs.gnu.org
Subject: bug#64253: 26.3; Bug in revert-buffer-with-coding-system
Date: Sat, 24 Jun 2023 11:51:39 +0300	[thread overview]
Message-ID: <83sfahz1ic.fsf@gnu.org> (raw)
In-Reply-To: <20230623.124319.782140973726874654.mail@localhost.localdomain> (message from meta1729 on Fri, 23 Jun 2023 12:43:19 +0530 (IST))

> Cc: meta1729 <meta1729@gmail.com>
> Date: Fri, 23 Jun 2023 12:43:19 +0530 (IST)
> From: meta1729 <meta1729@gmail.com>
> 
> 
> When a buffer is terminated with an un-encodable character,
> revert-buffer-with-coding-system modifies the buffer in unexpected
> ways when coding system of the buffer is changed from default
> iso-latin-1-unix to utf-8-unix, when the visited file contains
> characters that cannot be encoded in either iso-latin-1-unix or
> utf-8-unix.
> 
> Procedure to reproduce the bug.
> 
> [Create a file which has un-encodable characters and some text between them.]
> $ echo 3b3b20410a3b3b20420aa80a3b3b20430a3b3b20440aa9 | xxd -r -p > sample
> 
> Open in Emacs.
> $ emacs -q -nw --no-site-file -nsl sample
> 
> Enter: C-h C [describe-coding-system]
> Output:
> Coding system for saving this buffer:
>   1 -- iso-latin-1-unix (alias: iso-8859-1-unix latin-1-unix)
> 
> Enter: M-x revert-buffer-with-coding-system RET utf-8 RET yes
> 
> [The buffer has been incorrectly modified.  You can see escaped
> character code at the beginning of buffer, which previously existed at
> the end of the buffer.]

Thanks.  This 21-year old bug (a simple omission of a single code
line) should now be fixed on the emacs-29 branch.





  reply	other threads:[~2023-06-24  8:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23  7:13 bug#64253: 26.3; Bug in revert-buffer-with-coding-system meta1729
2023-06-24  8:51 ` Eli Zaretskii [this message]
2023-07-01  8:30   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sfahz1ic.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=64253@debbugs.gnu.org \
    --cc=meta1729@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.