GNU bug report logs - #2416
23.0.60; decode-coding-region

Previous Next

Package: emacs;

Reported by: mj <mj54590 <at> gmail.com>

Date: Fri, 20 Feb 2009 21:20:03 UTC

Severity: normal

Merged with 1809

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: MJ <mj54590 <at> gmail.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 2416 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org,
        Chong Yidong <cyd <at> stupidchicken.com>, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#2416: 23.0.60; decode-coding-region
Date: Sun, 22 Feb 2009 00:07:33 -0500
[Message part 1 (text/plain, inline)]
Juanma, thank you for the lisp code that reproduces the same problem that I
am having.

If a space is inserted at the beginning of the buffer, then the result is
correct (as stated in my bug report):

(with-temp-buffer
 (insert " ")
 (insert (make-string 20 ?.))
 (decode-coding-region 2 (point-max) 'us-ascii)
 (buffer-string))
" ...................."

(I use 'us-ascii just to show the coding does not matter).

Now, hopefully emacs developers will  be able to understand and fix the
problem.


On Sat, Feb 21, 2009 at 9:47 PM, Juanma Barranquero <lekktu <at> gmail.com>wrote:

> On Fri, Feb 20, 2009 at 22:13, mj <mj54590 <at> gmail.com> wrote:
>
> > (apply 'decode-coding-region (point-min) (point-max)  'us-ascii nil)
> >
> > The original buffer  content would be something like this:
> >
> > B7040400-12
> > some text here
> >
> > after decode-coding-region is executed, the buffer content became:
> >
> > ^@7040450-12
> > some text here
> >
> > Where ^@ is actually binary code \0 (not ascii ^ and @). There is another
> instance
> > that a string was decoded and the result is  ^@ prefixed.
>
> Could it be related to bug#1809?
>
> (with-temp-buffer
>  (insert (make-string 20 ?.))
>  (decode-coding-region 1 (point-max) 'raw-text)
>  (buffer-string))
>
> => "^@..................."
>
>    Juanma
>
[Message part 2 (text/html, inline)]

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.