From: MJ <mj54590@gmail.com>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: emacs-pretest-bug@gnu.org, Chong Yidong <cyd@stupidchicken.com>,
2416@emacsbugs.donarmstrong.com
Subject: bug#2416: 23.0.60; decode-coding-region
Date: Sun, 22 Feb 2009 00:07:33 -0500 [thread overview]
Message-ID: <f5f9b5810902212107y66268b0akfc70cb85d7501839@mail.gmail.com> (raw)
In-Reply-To: <f7ccd24b0902211847t1309d04dr3126a79eec1eba6a@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]
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@gmail.com>wrote:
> On Fri, Feb 20, 2009 at 22:13, mj <mj54590@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
>
[-- Attachment #2: Type: text/html, Size: 1951 bytes --]
next prev parent reply other threads:[~2009-02-22 5:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87eixqz6bc.fsf@cyd.mit.edu>
2009-01-06 17:32 ` bug#1809: 23.0.60; epa-encrypt-file corrupts files Juri Linkov
2009-01-15 1:12 ` bug#1809: decode-coding-inserted-region " Juri Linkov
2009-01-15 2:40 ` Juanma Barranquero
2009-01-15 23:02 ` Juri Linkov
2009-01-15 23:35 ` Juanma Barranquero
2009-02-22 18:20 ` bug#1809: marked as done (decode-coding-inserted-region corrupts files) Emacs bug Tracking System
2009-02-20 21:13 ` bug#2416: 23.0.60; decode-coding-region mj
2009-02-21 9:16 ` Eli Zaretskii
2009-02-21 13:20 ` MJ
2009-02-22 2:47 ` Juanma Barranquero
2009-02-22 5:07 ` MJ [this message]
2009-02-22 5:13 ` Juanma Barranquero
2009-02-22 5:23 ` MJ
2009-02-22 5:44 ` Juanma Barranquero
2009-02-22 5:50 ` Processed: " Emacs bug Tracking System
2009-02-22 6:07 ` Juanma Barranquero
2009-02-22 14:31 ` Andreas Schwab
2009-02-23 2:23 ` MJ
2009-02-22 18:20 ` bug#2416: marked as done (23.0.60; decode-coding-region) Emacs bug Tracking System
2009-02-21 17:21 bug#2416: 23.0.60; decode-coding-region Chong Yidong
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f5f9b5810902212107y66268b0akfc70cb85d7501839@mail.gmail.com \
--to=mj54590@gmail.com \
--cc=2416@emacsbugs.donarmstrong.com \
--cc=cyd@stupidchicken.com \
--cc=emacs-pretest-bug@gnu.org \
--cc=lekktu@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).