28 Feb
2007
28 Feb
'07
3 p.m.
Hi all I'm under UTF-8 environment and found that UTF-8 encoded string cannot be displayed with function draw-freetype-string.I wrote a script like this ===> (asdf:oos 'asdf:load-op :cl-gd) (setq oldimage (cl-gd:create-image 300 150)) (cl-gd:allocate-color 0 0 255 :image oldimage) (cl-gd:draw-freetype-string 100 100 "汉字" :font-name "/usr/share/fonts/truetype/arphic/gbsn00lp.ttf" :color (cl-gd:find-color 255 255 255 :resolve 't :image oldimage) :image oldimage :angle 0 :anti-aliased 't) (cl-gd:write-image-to-file "~/newimage.png" :type :PNG :image oldimage :if-exists :supersede) <=== But it displays the UTF-8 string "汉字" like this: &27721;&23383 How can I make my script displays the string correctly? Thanks.