[r6rs-discuss] [Formal] Improve port i/o.

From: John Cowan <cowan>
Date: Fri Nov 24 00:59:53 2006

Michael Sperber scripsit:

> OK. So how about MIME?

In MIME, we have a series of entity bodies initiated/terminated by a
sender-chosen sequence of bytes, which are encoded as ASCII characters
in the main headers. So in the general case you have to read in a whole
entity body (up to and including the terminator) as a blob, strip off
the terminator, separate the headers from the body, convert the headers
to ASCII, and convert the body using whatever encoding the headers say
to use.

None of this is facilitated by having streams with variable encodings
or lack thereof. What it does require is bulk transcoding of blobs
to strings.

MIME output could make use of a variable-encoding facility, and in general
the whole idea is less problematic for output ports. But converting to
a blob and outputting the blob works fine too.

-- 
We call nothing profound                        cowan_at_ccil.org
that is not wittily expressed.                  John Cowan
        --Northrop Frye (improved)
Received on Fri Nov 24 2006 - 00:59:49 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC