[Bese-devel] utf-8 encoding problem

hbabcockos1 at mac.com hbabcockos1 at mac.com
Mon May 29 22:58:38 UTC 2006


Hello,

I updated my version of UCW today and now I'm struggling to get utf8  
strings to my browser in a form that it can understand. If I try  
something like this:

(defun utf8-string ()
   (let ((my-string (make-array 3 :element-type 'character :initial- 
element #\SPACE)))
     (setf (char my-string 0) (code-char #xE5))
     (setf (char my-string 1) (code-char #x91))
     (setf (char my-string 2) (code-char #xB5))
     my-string))

(<:p (<:as-html (utf8-string)))     ; this would be in a render function

I don't get what I expect (which is a character in chinese). If I  
save the page in my browser and use more to read it, it looks like  
the 3 characters in my-string have become 6 characters. This worked  
in my 1.5 month old version of UCW, so maybe something changed since  
then? Do I need to specify the encoding anywhere besides in  
component/:content-type?

thanks,
-Hazen




More information about the bese-devel mailing list