GNU bug report logs -
#40519
28.0.50; decode-coding-string fails EOL conversion of ASCII string
Previous Next
Reported by: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Date: Thu, 9 Apr 2020 08:27:02 UTC
Severity: normal
Found in version 28.0.50
Done: Mattias EngdegÄrd <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> > Since commit 4ed39549e3f9dbfeb2aea0e2674a7701dbc0e5ea (Avoid expensive
> > recoding for ASCII identity cases (bug#40407)), below code returns
> > unexpected result.
> >
> > (let ((string "ABCD\x0d\nEFG")
> > inhibit-eol-conversion)
> > (decode-coding-string string 'raw-text-dos))
> >
> > -> "ABCD^M
> > EFG"
> >
> > expected result is
> > -> "ABCD
> > EFG"
> >
> > It seems that the committed code does not take care of EOL conversion.
>
> Thanks, I hope I fixed this now.
Thank you. But there is still a problem in encode-coding-string.
(let ((string "ABCD\nEFG")
inhibit-eol-conversion)
(list
(encode-coding-string string 'raw-text-dos)
(encode-coding-string string 'raw-text-mac)))
-> ("ABCD
EFG" "ABCD
EFG")
--
Kazuhiro Ito
This bug report was last modified 5 years and 121 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.