GNU bug report logs - #1035
23.0.60; DOS eol decoding bug

Previous Next

Package: emacs;

Reported by: bojohan+mail <at> dd.chalmers.se (Johan Bockgård)

Date: Fri, 26 Sep 2008 20:40:04 UTC

Severity: normal

Done: Jason Rumney <jasonr <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1035 in the body.
You can then email your comments to 1035 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1035; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to bojohan+mail <at> dd.chalmers.se (Johan Bockgård):
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

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

From: bojohan+mail <at> dd.chalmers.se (Johan Bockgård)
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; DOS eol decoding bug
Date: Fri, 26 Sep 2008 22:34:12 +0200
Decoding a chunk of DOS text that ends in \r results in an extra chunk
of garbage.

    (progn
      (with-temp-file "/tmp/bar"
        (insert-char ?x 10)
        (insert "\r"))
      (with-temp-buffer
        (let ((coding-system-for-read 'raw-text-dos))
          (insert-file-contents "/tmp/bar")
          (buffer-size))))

      => 21 (expected result 11)


I think the problem was introduced with this change:

2008-03-02  Kenichi Handa  <handa <at> m17n.org>

    * coding.c (decode_coding_utf_8): When eol-type of CODING is `dos',
    don't decode '\r' if that is the last in the source.
    (decode_coding_utf_16, decode_coding_emacs_mule)
    (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
    (decode_coding_raw_text, decode_coding_charset): Likewise.
    (produce_chars): Don't decode EOL here. Use EMACS_INT.

-- 
Johan Bockgård




Reply sent to Jason Rumney <jasonr <at> gnu.org>:
You have taken responsibility. (Sat, 20 Dec 2008 08:10:07 GMT) Full text and rfc822 format available.

Notification sent to bojohan+mail <at> dd.chalmers.se (Johan Bockgård):
bug acknowledged by developer. (Sat, 20 Dec 2008 08:10:07 GMT) Full text and rfc822 format available.

Message #10 received at 1035-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Johan Bockgård <bojohan+mail <at> dd.chalmers.se>,
        1035-done <at> debbugs.gnu.org
Subject: Re: bug#1035: 23.0.60; DOS eol decoding bug
Date: Sat, 20 Dec 2008 16:02:54 +0800
Johan Bockgård wrote:
> Decoding a chunk of DOS text that ends in \r results in an extra chunk
> of garbage.
>   

Thanks for reporting it, I have fixed this now.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Mon, 19 Jan 2009 15:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 249 days ago.

Previous Next


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