[Top][All Lists]

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

Re: string port encodings

From: Andy Wingo
Subject: Re: string port encodings
Date: Wed, 16 Jan 2013 17:57:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi :)

On Wed 16 Jan 2013 16:44, address@hidden (Ludovic Courtès) writes:

> Andy Wingo <address@hidden> skribis:
>> But no, currently the answer is locale-specific.  It encodes the string
>> according to the current locale, then decodes it from that encoding.  If
>> your locale can't encode the string, tough luck for you!
> SRFI-6 uses Unicode-capable ports since
> ecb48dccbac6b8fdd969f50a23351ef7f4b91ce5

I have never heard of this srfi before; I always thought our string
ports "just worked" :P

> Otherwise, %default-port-encoding governs (info "(guile) String Ports"):

But why?  The documentation does not say it; it merely spends electrons
describing how to make string ports actually accept all characters.

You mention one use case:

> as a smart way to do encoding conversion.

But surely this is not a common case and is adequately handled by
set-port-encoding!, potentially via an optional argument.

> The thing is, unlike R6RS, our ports can be used both for textual and
> binary I/O.

I am aware of this, and not arguing against it :)

> This has been discussed at length already, and I think all the pros and
> cons have been written already.  :-)

"What from your father you’ve inherited, You must earn again, to own it
straight." -- Faust


Flippantly yours,


reply via email to

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