Hello,
I just came across this slightly strange behaviour of CHICKEN on a terminal:
$ csi
______ __ __ __
| | |--.|__|.----.| |--.-----.-----.
| ---| || || __|| <| -__| |
|______|__|__||__||____||__|__|_____|__|__|
Version 2, Build 101 - macosx-unix-gnu-ppc - [ dload ]
(c)2000-2005 Felix L. Winkelmann
#;1> (define str (string #\nul #\x02 #\1))
#;2> (string->list str)
(#\nul #\x2 #\1)
#;3> str
"\\1"
#;4> (string->list "\\1")
(#\\ #\1)
#;5> (string->list "\x00\x021")
(#\nul #\x2 #\1)
Similar behaviour can also be seen if you apply string->symbol to the
above string and write the symbol.
Although writing all sorts of special characters to the output port as
themselves works fine for file ports, terminals may get confused by
this. I think it would be nicer to output characters <32 and >128 as
hexadecimal or octal escape sequences, at least on a terminal port.
cu,
Thomas Chust
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users