Yuval Langer wrote 1 months ago
(address . bug-guile@gnu.org)
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"