GNU bug report logs - #1809
decode-coding-inserted-region corrupts files

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Tue, 6 Jan 2009 17:55:03 UTC

Severity: normal

Merged with 2416

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 1809 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Juri Linkov" <juri <at> jurta.org>
Cc: 1809 <at> debbugs.gnu.org
Subject: Re: bug#1809: decode-coding-inserted-region corrupts files
Date: Thu, 15 Jan 2009 03:40:22 +0100
On Thu, Jan 15, 2009 at 02:12, Juri Linkov <juri <at> jurta.org> wrote:

> (progn
>  (switch-to-buffer "test")
>  (insert "Test.\nTest2.\nTest3.\n")
>  (decode-coding-inserted-region
>   (point-min) (point-max) "/tmp/test" t nil nil nil))

(with-temp-buffer
   (insert (make-string 20 ?.))
   (decode-coding-region 1 (point-max) 'raw-text)
   (buffer-string))

 => "^@..................."

It only happens for a string of length 20 bytes.

    Juanma




This bug report was last modified 16 years and 95 days ago.

Previous Next


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