[plt-scheme] unicode input

From: Artem Baguinski (artm at v2.nl)
Date: Wed Oct 20 06:22:38 EDT 2004

hello

i am happy about unicode support an all. 

Warning: this mail is in UTF-8 encoding and contains Russian, sorry if it
looks ugly or doesn't make sense in non-unicode aware or non-Russian
enabled mailer.

i decided to start drscheme and type something in Russian to see how it
works.

i can't! (i think the problems I've encountered ain't russian specific.
but they may be related to my system, which is gnu/linux with en_GB.UTF-8
locale)

i can paste utf-8 encoded Russian into drscheme though. if i type
"русский" in terminal and copy and paste it to drscheme i get
"русский". if i type the same in pan and copy and paste it i get
"\u0440\u0443\u0441\u0441\u043a\u0438\u0439" (which is the equal? to
"русский" but looks funny). 

Also, colorer seems to get confused about Russian string. It's painted red
and sometimes i manage to make it deadlock with "exception in colorer
thread". (I can't figure out exact situation so i can't reproduce it yet).
But if i copy and paste Russian string from drscheme itself it IS painted
green like other strings. 

If I type some Russian in other editor and open the file in drscheme
colorer is just as confused - everything after the Russian string is red. 

apart from that it works OK:

utf.ss:

(require (lib "string.ss"))
(define brown-fox "фазан")
(define fazan (string-copy brown-fox))
(string-uppercase! fazan)

REPL:

> fazan
"ФАЗАН"
> (string-length fazan)
5
> 

(the uppercase version is correct if you don't know Cyrillic)

-- 
gr{oe|ee}t{en|ings}
artm 




Posted on the users mailing list.