Re: File name encoding and GTK ABI compatibility on Win32



John Ehresman writes:
 > To support apps that use G_FILENAME_ENCODING to determine which encoding 
 > to convert filenames to and from.

But G_FILENAME_ENCODING (or G_BROKEN_FILENAMES) has never had any
effect for GLib on Windows. Check GLib 2.4 sources.

On Unix, G_FILENAME_ENCODING will continue to work as before.

 > This does mean that people will need to update their sources before
 > recompiling with 2.6; 

Yes. A bit inconvenient, but on the other hand I would say using UTF-8
is the Right Thing.

 > otherwise things will break at runtime when a filename is converted
 > to the incorrect encoding.

Hmm, I would guess that the typical case will be that apps break when
people get a file name from g_dir_read_name() or construct one from
g_get_home_dir(), and then try to fopen() or stat() it, only to get an
ENOENT. Need to use g_fopen() or g_stat(). Etc.

Ditto if the app gets a file name in UTF-8 from some GTK widget, and
then convert it using g_filename_from_utf8(), and then fopen()
it. Need to use g_fopen() here, too.

--tml





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]