Re: %default-port-conversion-strategy and string ports

2012-06-01 Thread Ludovic Courtès
Hi! Mark H Weaver m...@netris.org skribis: SRFI-6 (string ports) says nothing about port encodings, and yet portable code written for SRFI-6 will fail on Guile 2.0 unless the string is constrained to whatever the default port encoding happens to be. This is not just a theoretical issue; it

Re: %default-port-conversion-strategy and string ports

2012-06-01 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: Hi! Mark H Weaver m...@netris.org skribis: SRFI-6 (string ports) says nothing about port encodings, and yet portable code written for SRFI-6 will fail on Guile 2.0 unless the string is constrained to whatever the default port encoding happens to be.

Re: %default-port-conversion-strategy and string ports

2012-06-01 Thread Ludovic Courtès
Hi David, Ports in Guile can be used to write characters, or bytes, or both. In particular, every port (including string ports, void ports, etc.) has an “encoding”, which is actually only used for textual I/O. Conversely, an R6RS port is either textual or binary, but not both. IMO, one

Re: %default-port-conversion-strategy and string ports

2012-06-01 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: Ports in Guile can be used to write characters, or bytes, or both. In particular, every port (including string ports, void ports, etc.) has an “encoding”, which is actually only used for textual I/O. Conversely, an R6RS port is either textual or binary,