Badly treated eol-style (end of line style) in R6RS transcoders.

  • Open
  • quality assurance status badge
Details
One participant
  • Yuval Langer
Owner
unassigned
Submitted by
Yuval Langer
Severity
normal

Debbugs page

Yuval Langer wrote 1 months ago
(address . bug-guile@gnu.org)
CAK0OjG0vBVZfhPnuDije4rzgu7VZQYDD1G-xxHkM94P8St9+ZQ@mail.gmail.com
When running the `transcoders.scm` script (file attached) in Guile:

```
$ guile transcoders.scm
```

I get the output:

```
"abc\r"
```

but it should be:

```
"abc"
```

When running Chez Scheme:

```
$ chezscheme --script transcoders.scm
```

I get the right output:

```
"abc"
```

This is due to faulty transcoders in Guile, maybe?

My `guile --version` says `guile (GNU Guile) 3.0.9`, and `chezscheme
--version` says `9.5.4`.

Many thanks,
Yuval Langer.
(import (rnrs io ports) (rnrs bytevectors)) (let* ([x (string->utf8 "abc\r\ndef\r\n")] [input-port-from-bytevector (open-bytevector-input-port x)] [transcoder (make-transcoder (utf-8-codec) (eol-style crlf))] [text-port (transcoded-port input-port-from-bytevector transcoder)] [a-line (get-line text-port)]) (write a-line) (newline) a-line) ;; => "abc\r", but should be "abc"
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76163@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76163
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help