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

From: Jim Blandy (jimb at redhat.com)
Date: Sat Feb 26 17:47:59 EST 2005

Alex Shinn <foof at synthcode.com> writes:
> I'm honestly puzzled as to what could be hard to use about it.  I
> consider the C model downright painful to use.

The Japanese hiragana character 'A' followed by the latin character
'a' is encoded in iso-2022-jp as the following sequence of bytes (in

    #x1b #x24 #x42 #x24 #x22 #x1b #x28 #x42 #x61


    - an "ESC $ B" to get into the two-byte-per-char mode,
    - the two bytes #x24 and #x22, indicating the hiragana 'A',
    - an "ESC ( B" to get back into the single-byte ASCII mode,
    - the single byte #x61, indicating the latin character 'a'.

In your implementation, if I read a character, and then a byte, which
character and byte do I get?

Posted on the users mailing list.