[gambit-list] Character encoding and the repl

Adam adam.mlmb at gmail.com
Sun May 31 07:14:35 EDT 2015


Marc,

The new autodetection routine at lib/_io#.scm:747+ in
https://github.com/feeley/gambit/commit/8d2c2e60c007a473f1aa1d16110c4a547d29b7a0
is
super nice.

I agree it's nice that all readable european, asian, etc. characters come
out unescaped, but it's weird to know that Gambit would come
not-copy-paste-proof out of the box, and that you need a specialized script
at startup to fix that.

I use the best terminal software and it does not show all unicode
characters;

To understand the implications of unescaped Unicode characters, I read up
on http://unicode.org/charts/ and other places, and it seems that the worst
abuse of Unicode characters is illustrated here
http://www.marlborotech.com/Zalgo.html , and maybe also the
right-to-left/left-to-right characters can cause disorder -

for reference, attached a screenshot of how messed up unicode shows in
Chrome and its DOM inspector, so this is how a Gambit console window could
look. In itself not too bad.



I would primarily suggest that a command line option would be added that
configures the escaping e.g. -:E  , -:E127 (or maybe -:T127 for terminal
and -:F127 for files).

Secondarily I would suggest reverting lib/_io.scm:13119 back
to (##integer->char 127) i.e. escape all >127 again, as at least I find
this to be really more a "safe by default" behavior.


Anyone else has any thoughts on this topic?




2015-05-31 1:24 GMT+05:30 Adam <adam.mlmb at gmail.com>:

>
> 2015-05-31 1:11 GMT+05:30 Marc Feeley <feeley at iro.umontreal.ca>:
>
>>
>> > On May 30, 2015, at 3:26 PM, Adam <adam.mlmb at gmail.com> wrote:
>> >
>> > Marc, what do those who want preserve the escaping of >=128 do
>> (independent of which terminal encoding is used but for instance with -:t8)?
>> >
>>
>>   (output-port-readtable-set!
>>     (repl-output-port)
>>     (readtable-max-unescaped-char-set
>>       (output-port-readtable (repl-output-port))
>>       (integer->char 127)))
>>
>> In your Scheme program or gambcini file.
>>
>
> Ouch;
>
>
> What's your take now on what you said yesterday as quoted in
> https://mercure.iro.umontreal.ca/pipermail/gambit-list/2015-May/007914.html ,
> and the other reflections on this topic there?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20150531/439b3ffc/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Zalgo screenshot.png
Type: image/png
Size: 156533 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20150531/439b3ffc/attachment.png>


More information about the Gambit-list mailing list