GNU bug report logs -
#32329
call-with-input-file and call-with-output-file should use textual ports
Previous Next
Reported by: Göran Weinholt <goran <at> weinholt.se>
Date: Tue, 31 Jul 2018 07:45:01 UTC
Severity: normal
Done: Mark H Weaver <mhw <at> netris.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 32329 in the body.
You can then email your comments to 32329 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#32329
; Package
guile
.
(Tue, 31 Jul 2018 07:45:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Göran Weinholt <goran <at> weinholt.se>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Tue, 31 Jul 2018 07:45:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello schemers,
the call-with-input-file and call-with-output-file procedures in (rnrs
io simple) should open textual ports. In Guile 2.2.4, they open binary
ports:
(define (call-with-input-file filename proc)
(call-with-port (open-file-input-port filename) proc))
(define (call-with-output-file filename proc)
(call-with-port (open-file-output-port filename) proc))
Changing the inner calls to open-input-file and open-output-file is
sufficient to fix this bug.
A consequence of using binary ports here is that the I/O is not
transcoded, so UTF-8 data is corrupted.
--
Göran Weinholt
Debian developer
73 de SA6CJK
Reply sent
to
Mark H Weaver <mhw <at> netris.org>
:
You have taken responsibility.
(Thu, 02 Aug 2018 14:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Göran Weinholt <goran <at> weinholt.se>
:
bug acknowledged by developer.
(Thu, 02 Aug 2018 14:47:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 32329-done <at> debbugs.gnu.org (full text, mbox):
Hi Göran,
Göran Weinholt <goran <at> weinholt.se> writes:
> the call-with-input-file and call-with-output-file procedures in (rnrs
> io simple) should open textual ports. In Guile 2.2.4, they open binary
> ports:
>
> (define (call-with-input-file filename proc)
> (call-with-port (open-file-input-port filename) proc))
>
> (define (call-with-output-file filename proc)
> (call-with-port (open-file-output-port filename) proc))
>
> Changing the inner calls to open-input-file and open-output-file is
> sufficient to fix this bug.
>
> A consequence of using binary ports here is that the I/O is not
> transcoded, so UTF-8 data is corrupted.
Fixed in commit 4c91de3e45e7c98d5b7c484509fe5c59bd70f9fd on the
'stable-2.2' branch. Thanks!
Mark
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 31 Aug 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.