Re: g_locale_to_utf8 on current MS Windows
- From: Tor Lillqvist <tml iki fi>
- To: Allin Cottrell <cottrell wfu edu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: g_locale_to_utf8 on current MS Windows
- Date: Mon, 23 Nov 2009 05:14:47 +0200
I've had a problem report from a user of my GTK app on Windows 7,
You mean this is something new in Windows 7 (which I find hard to
believe), or has this particular user just not used your app on
earlier Windows versions?
from which it looks as if g_locale_to_utf8 has somehow not done
the right thing on a Windows filename,
You mean a file name in the encoding the C library uses, or the
encoding GLib and the GTK+ stack uses? GLib and GTK+ use UTF-8 for
file names on Windows in their API; all GLib and GTK+ API that accept
/ return file names (or other strings to / from the system like
environment variable names or values) accept / return them in UTF-8.
which was apparently in
some Unicode representation and not the old-style Windows
codepage.
Seems like it is the GLib file name encoding then, i.e. UTF-8. It's
not correct to use g_locale_to/from_utf8() on such file names. Use
g_filename_to/from_utf8(). (Which on Windows is a no-op conversion
from UTF-8 to UTF-8, but on Unix might actually do something.)
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]