[gambit-list] Character encoding and the repl

Adam adam.mlmb at gmail.com
Fri May 29 16:06:24 EDT 2015


Wait, if the default -:t setting could be changed from "1"("A"?) to "8"
with the motivation that that would make it friendlier out of the box,

what would the implied worst-case be, for instance on a 0..255 only
terminal?


So the -:t setting affects both console IO (print read-line etc.) and REPL
IO (the Read step).

(
I guess the implied worst-case for the current "1"("A"?) default is

 * If the terminal is UTF-8 only: Trashing of input of >=128 characters,
e.g.

gsi

> (string->list "ü")
(#\xc3 #\xbc)


   (REPL left-right input behavior when attempting to input them is messed
up but that could maybe be fixed.

    Non-escaped output of the trashed input has an "untrashing" effect
which can conceal the trashing problem, but that is intended, as in that
the ISO-8859-1(&ASCII?) coder has a 1:1 byte to char mapping, and also
showing the same with escaped output immediately shows the problem e.g.
"\303\274" for what should have been "\374".)

 * Scary error messages when trying to output unicode chars

> (print (make-string 1 (integer->char 1234)) "\n")
*** ERROR IN ##write-substring -- Can't convert to C ISO-8859-1-string
(write-char #\u04d2 '#<input-output-port #2 (console)>)
1>

)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://webmail.iro.umontreal.ca/pipermail/gambit-list/attachments/20150530/87d060c5/attachment.html 


More information about the Gambit-list mailing list