Re: How to
- From: Tor Lillqvist <tml iki fi>
- To: Alois Goller <goller tttech com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: How to
- Date: Fri, 21 Dec 2001 00:30:07 +0200 (FLE Standard Time)
Alois Goller writes:
> We (want to) use GTK as front-end for our Python-based tools, running on
> Linux and Window. As I found, GTK uses UTF-8 for string
(On Windows, that is. On Unix you presumably use GTK 1.2.x, which does
> Fine! But how can I open a file once the user entered a filename?
Use g_filename_from_utf8. (Inside #if GLIB_CHECK_VERSION(1,3,0))
> What I actually would like to have is a function that returns the default
> encoding used.
You mean for GTK? I think
#if defined(GTK_CHECK_VERSION) && GTK_CHECK_VERSION(1,3,0)
should work. (There wasn't a GTK_CHECK_VERSION in GTK 1.2., and the so
called "production" GTK+ on Win32 is 1.3.0.) That check should thus
work correctly both for GTK+ 1.2 on Unix, "production" GTK+ 1.3.0 on
Windows, and a future GTK+ 2.0 on both.
] [Thread Prev