* Raymond Toy [2010-10-01 00:11] writes:
This has been happening for some time, and it's annoying enough that I want to fix it. With CMUCL 20b and slime 2010-09-20, try the following:
(defvar *s* (make-string 4)) *s* (setf (lisp:codepoint *s* 0) #x10000))
Upto now, everything is ok. Now print the string:
*s*
At this point, the string is displayed, with a rectangular box for the codepoint #x10000 followed by two ^@ for the two null characters. (Recall that unicode strings in cmucl are utf-16 strings, so the first two elements of *s* are the surrogate pair for #x10000.)
What is the length of *s* or (prin1-to-string *s*) now? Should it be 3 not 4?
Helmut