[gambit-list] Character encoding and the repl

Adam adam.mlmb at gmail.com
Sat May 30 15:26:53 EDT 2015


Marc, what do those who want preserve the escaping of >=128 do (independent
of which terminal encoding is used but for instance with -:t8)?

2015-05-30 21:57 GMT+05:30 Marc Feeley <feeley at iro.umontreal.ca>:

> I have pushed a change which allows #f as the setting of the
> max-unescaped-char of a readtable, and it is now the default instead of
> (integer->char 127).  When max-unescaped-char is #f the printer will take
> into account the character encoding of the output port and use escapes when
> the character can’t be encoded.  I have also changed the default character
> encoding of the terminal, files, etc to use ASCII.  This setting is
> actually equivalent to ISO-8859-1 (latin-1) at the lowest level of the
> runtime system, i.e. chars are encoded using 8 bits and the top bit is
> significant, but the printer will use escapes when the character code is
> above 127 (because ASCII is a 7 bit code).
>
> This means that when no runtime options are passed to gsi the system will
> escape characters exactly as before.  However, with
>
>    gsi -:tU    (or gsi -:t8)
>
> the system will not escape characters whose code is > 127.
>
> For the users prefering this behavior, including you I assume, it can be
> made the default by setting the GAMBCOPT environment variable like this in
> your .profile:
>
>   GAMBCOPT=tU
>
> This is better than changing the readtable in the gambcini file because it
> will apply to all Scheme programs compiled with Gambit, not just the
> interpreter, and it can be overriden with an explicit -:tA when starting
> gsi if you want to escape non-ASCII characters in a specific situation.
>
> Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20150531/05a5cfb4/attachment.htm>


More information about the Gambit-list mailing list