Page 1 of 1
GTK and Unicode
Posted: Sat Dec 30, 2006 8:06 pm
by WishMaster
Yes, always Unicode
This works as expected if you disable unicode support but with unicode it only outputs "H".
gtk_init_(0, 0)
*gdialog = gtk_message_dialog_new_(0, #GTK_DIALOG_MODAL, #GTK_MESSAGE_INFO, #GTK_BUTTONS_OK, "Hello there!" ,"","")
resp=gtk_dialog_run_(*gdialog)
gtk_widget_destroy_(*gdialog)
Posted: Sat Dec 30, 2006 9:06 pm
by Fred
Yes, gtk2 expect UTF8 string, while gtk1 expect ascii (no unicode support). Internal PB strings are UTF16.
Posted: Sat Dec 30, 2006 9:42 pm
by remi_meier
Code: Select all
ImportC "/usr/lib/libgtk.a"
gtk_message_dialog_new(l.l, d.l, f.l, e.l, s.p-utf8 , r.p-utf8, k.p-utf8)
EndImport
gtk_init_(0, 0)
*gdialog = gtk_message_dialog_new(0, #GTK_DIALOG_MODAL, #GTK_MESSAGE_INFO, #GTK_BUTTONS_OK, "Hello there!" ,"","")
resp=gtk_dialog_run_(*gdialog)
gtk_widget_destroy_(*gdialog)
works.
How do I get such a path? Are these libs always in /usr/lib/?
Or: where can I read about standard paths of Linux?
Posted: Sat Dec 30, 2006 10:01 pm
by WishMaster
Posted: Sat Dec 30, 2006 11:04 pm
by remi_meier
Yep, I used whereis to find it, but I wasn't sure if it is always in this path. I often
see paths like "lib-tkg-1.8.1.0\tkgg-lib". I think this one isn't safe because
of the version number in the path, but it sometimes is the only path I can
find.
Thx for the wiki-link

Posted: Sun Dec 31, 2006 12:03 am
by WishMaster
I looked fot libgtk.a here on my OpenSUSE 10.2 system - even with whereis I couldn't find it.
So I used
find / | grep libgtk.a et voilĂ : It is in /opt/gnome/lib

Posted: Sun Dec 31, 2006 12:26 am
by remi_meier
This path doesn't exist here.
Uh, what if it were a shared object?
btw: The IDE doesn't show the SO-Output option.
Posted: Sun Dec 31, 2006 8:14 am
by olejr
remi_meier wrote:This path doesn't exist here.
Uh, what if it were a shared object?
This is why Linux has ldconfig & /etc/ld.so.conf..
To sort out different paths to libs on different distros..
Posted: Sun Dec 31, 2006 11:30 am
by WishMaster
> This is why Linux has ldconfig & /etc/ld.so.conf..
Great, I didn't know this yet.

Posted: Sun Dec 31, 2006 2:18 pm
by remi_meier
Thx olejr, I think I have to read about it now a little bit.