[plt-scheme] Why do MzScheme ports not respect the locale's encoding by default?

From: Michael Sperber (sperber at informatik.uni-tuebingen.de)
Date: Tue Mar 1 02:30:22 EST 2005

>>>>> "Jim" == Jim Blandy <jimb at redhat.com> writes:

Jim> Michael Sperber <sperber at informatik.uni-tuebingen.de> writes:

>> Sure it needs to be specified---but I don't think it needs to be
>> *restricted* in unreasonable ways.  Somebody needs to sit down and say
>> *per encoding* (or per encoding conversion) what bytes a READ-CHAR
>> will remove from the port.  This happens to be easy for the various
>> Unicode encodings, and that's what should guide the design.

Jim> It's obvious and unambiguous for UTF-8, and the rest of the character
Jim> encoding schemes.  But any such choice for ISO-2022 will be useless in
Jim> some cases.  It'll be well-defined, but not actually useful.

I don't think so---as Alex Shinn pointed out, you just need to avoid
situations with inherent problems as you describe.  Since the problems
have nothing to do with the API, but rather with specifying how
encoding state carries over gaps in the stream, that's pretty much
necessary anyway.

Jim> In other words, you're only interested in supporting encodings that
Jim> don't complicate the interface much.  Is that a fair restatement of
Jim> what you're saying?

No.  I said that it's not worth abandoning mixed ports because some
encodings make it hard to specify the semantics.

Jim> Does it concern you that the interface you've selected requires
Jim> iconv-based implementations to use iconv inefficiently?

I don't think that's true.

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

Posted on the users mailing list.