From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MJ Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#2416: 23.0.60; decode-coding-region Date: Sun, 22 Feb 2009 00:07:33 -0500 Message-ID: References: <499f1cdd.050cc00a.4267.ffffc0ce@mx.google.com> Reply-To: MJ , 2416@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=000e0cd4d97e1f4d3e04637add47 X-Trace: ger.gmane.org 1235280252 28882 80.91.229.12 (22 Feb 2009 05:24:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Feb 2009 05:24:12 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Chong Yidong , 2416@emacsbugs.donarmstrong.com To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 22 06:25:23 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lb6q9-00075y-Kn for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Feb 2009 06:25:22 +0100 Original-Received: from localhost ([127.0.0.1]:44318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lb6op-0005PI-A8 for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Feb 2009 00:23:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lb6oh-0005Lo-4b for bug-gnu-emacs@gnu.org; Sun, 22 Feb 2009 00:23:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lb6of-0005KV-Hw for bug-gnu-emacs@gnu.org; Sun, 22 Feb 2009 00:23:50 -0500 Original-Received: from [199.232.76.173] (port=39859 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lb6of-0005KC-AI for bug-gnu-emacs@gnu.org; Sun, 22 Feb 2009 00:23:49 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:36116) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lb6od-0003w8-U7 for bug-gnu-emacs@gnu.org; Sun, 22 Feb 2009 00:23:48 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1M5Na7g021402; Sat, 21 Feb 2009 21:23:46 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n1M5F5n8019343; Sat, 21 Feb 2009 21:15:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: MJ Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 22 Feb 2009 05:15:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2416 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 2416-submit@emacsbugs.donarmstrong.com id=B2416.123527925717782 (code B ref 2416); Sun, 22 Feb 2009 05:15:05 +0000 Original-Received: (at 2416) by emacsbugs.donarmstrong.com; 22 Feb 2009 05:07:37 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1M57YAw017776 for <2416@emacsbugs.donarmstrong.com>; Sat, 21 Feb 2009 21:07:35 -0800 Original-Received: by yw-out-2324.google.com with SMTP id 5so597566ywb.31 for <2416@emacsbugs.donarmstrong.com>; Sat, 21 Feb 2009 21:07:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=akKEU2b0au6IJE8KyWunoWM2MaZJ4jdtfmpY+h1f8yo=; b=RmZecqOgh+0k7kI9VfQYBEk/0DMJAK/180sHLbKGZv3GuVlXMwGroj2tWd2kaTytNh 3cSVDnxLHsEAHRn3kiZmGPicGbgFHyUmPutDvoI99otWEjiHrJWeHmJk58nrxKOXp6ao N2YQ5+3nJIRSUAfwDh2vyfNiKIlz0QpNye7jc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=B96avbXpQHoFB1I+iXVzB2++QQxqAXK0JqFsAvQNWLZs64Enh+hZn7hzNI0DJdWp90 pZPhtCTddFV3L+6EBn2hP+2V35J52CFqAvh8qClfIN3ASFYPXcF8vrAgkowQIDdbrhmM xFmSkK5V4baU2SVlQ/vb0SzjmopbzSzuHhjdo= Original-Received: by 10.150.195.21 with SMTP id s21mr2756679ybf.16.1235279253818; Sat, 21 Feb 2009 21:07:33 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 22 Feb 2009 00:23:49 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:25578 gmane.emacs.pretest.bugs:23966 Archived-At: --000e0cd4d97e1f4d3e04637add47 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 wrote: > On Fri, Feb 20, 2009 at 22:13, mj 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 > --000e0cd4d97e1f4d3e04637add47 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 fi= x 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 anot= her 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))

=3D> "^@..................."

   Juanma

--000e0cd4d97e1f4d3e04637add47--