[plt-scheme] 299.7
>>>>> "MF" == Matthew Flatt writes:
MF> For list-related administrative tasks:
MF> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
MF> At Wed, 12 May 2004 17:06:58 +0400, Alex Ott wrote:
>> What do you think about C++ aproach to encoding and locale conversion for
>> ports and strings?
MF> If I understand C++'s approach to ports/streams correctly, the encoding
MF> between strings and bytes is a (mutable) property of the stream object.
MF> In MzScheme 299, functions like `read-char' and `write-char' assume a
MF> UTF-8 decoding of the stream. To get a different kind of decoding, you
MF> wrap the port to convert between UTF-8 and the other encoding. (In the
MF> near future, `(lib "port.ss")' will provide a port->port wrapper.)
Ok
MF> For obvious reasons, I would be opposed to a mutable property on ports
MF> to specify the encoding. I did consider making a port's encoding a
MF> property that is specified when the port is created, but that's too
MF> early in many cases --- exactly the mess of having distinguish text and
MF> binary streams.
but i speak about not only encoding, but also about locale - for example, i
could need to read numbers in russian locale, without setting it program wide
--
With best wishes, Alex Ott
Jet Infosystems, http://www.jetinfosoft.ru/
+7 (095) 411 76 01