emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#32329: closed (call-with-input-file and call-with-


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#32329: closed (call-with-input-file and call-with-output-file should use textual ports)
Date: Thu, 02 Aug 2018 14:47:02 +0000

Your message dated Thu, 02 Aug 2018 10:44:58 -0400
with message-id <address@hidden>
and subject line Re: bug#32329: call-with-input-file and call-with-output-file 
should use textual ports
has caused the debbugs.gnu.org bug report #32329,
regarding call-with-input-file and call-with-output-file should use textual 
ports
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
32329: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32329
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: call-with-input-file and call-with-output-file should use textual ports Date: Tue, 31 Jul 2018 09:14:12 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
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



--- End Message ---
--- Begin Message --- Subject: Re: bug#32329: call-with-input-file and call-with-output-file should use textual ports Date: Thu, 02 Aug 2018 10:44:58 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Hi Göran,

Göran Weinholt <address@hidden> 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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]