[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Unicode inside csi
From: |
John Cowan |
Subject: |
Re: [Chicken-users] Unicode inside csi |
Date: |
Tue, 3 Apr 2007 14:37:02 -0400 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
minh thu scripsit:
> #;1> (char->integer (string-ref "\u00f9" 0))
> 195
What happens here is that when you use a \u escape, it stores
the correct UTF-8 representation into the string. Unless you
have loaded the utf8 egg, though, string-ref will select the bytes
of the string instead of interpreting it as containing UTF-8
characters.
So you need:
(use syntax-case)
(use utf-8)
(import utf-8)
and then this will correctly return 249.
--
Mos Eisley spaceport. You will never John Cowan
see a more wretched hive of scum and address@hidden
villainy -- unless you watch the http://www.ccil.org/~cowan
Jerry Springer Show. --georgettesworld.com