[plt-scheme] Unicode on the cheap
At Sun, 25 Jan 2004 08:35:29 -0600, Robby Findler wrote:
> If I were to put four of those chinese characters into string (eg by
> calling `string' with four arguments), why wouldn't the resulting
> string have a `string-length' of four?
If you create a string by calling `string' with four arguments, then
`string-length' reports 4. Each of the four arguments to `string' is a
"char" (and therefore a code unit or #\377 or #\376).
But you can't create a string containing four Chinese characters by
calling `string' with four arguments, because each Chinese character
requires three "char"s.
Matthew