[plt-scheme] Unicode, take 3

From: Gordon Weakliem (gweakliem at oddpost.com)
Date: Fri Apr 2 15:34:30 EST 2004

-----Original Message from Richard C. Cobbe <cobbe at ccs.neu.edu>----- 
>An interesting question: in those languages which allow (essentially) 
>arbitrary Unicode strings as identifier names, how many programs 
>actually take advantage of this capacity, as opposed to just sticking to 
>straight ASCII? 
The discussion of "what should be the legal character set for symbols" has concentrated on programmer practices and ignored the possibility of identifiers being created programatically, i.e. via string->symbol.  This is done most notably (for me) in the SSAX XML parser.  Currently, string->symbol works for any character in the range 0-255: 
 (do ((i 0 (+ i 1))) 
   ((= i 255) #t) 
   (print (string->symbol (string (integer->char i)))) 
I'd consider string->symbol broken if it couldn't handle (string (integer->char i)) for any i where integer->char returns a value. 
[1] http://www.asciitable.com/ 
[2] http://www.unicode.org/charts/PDF/U0080.pdf 
Gordon Weakliem 

Posted on the users mailing list.