[cells-gtk-devel] UTF-8 support

Dmitri Hrapof hrapof at common-lisp.ru
Thu Jan 17 13:12:11 UTC 2008


Ingo Bormuth wrote:
> The following might be better.
>
> Code is: (mk-button :label (sb-ext:string-to-octets "foo äöüß bar" :external-format :utf-8))
>
>
> The value of STRING is #(102 111 111 32 195 164 195 182 195 188                                                                                                           
>                          ...), which is not of type STRING.                                                                                                               
>    [Condition of type SIMPLE-TYPE-ERROR]                                                                                                                                                                                                                                                                                                            
Yes, now it's clear.
MK-BUTTON expects a Lisp string, being decent Lisp function, not some
FFI abomination ;)
So the solution is to place (sb-ext:string-to-octets "foo äöüß bar"
:external-format :utf-8) deeper, between MK-BUTTON and GTK-BUTTON-SET-LABEL.
As I used extensively only FFI part of cells-gtk, I didn't have to do it.

Good luck,
Dmitri



More information about the cells-gtk-devel mailing list