Re: GLib String support



> Strings in glib/gtk always are UTF-8. Always.

Not *all* strings. I would say for GTK+ what you say is true (except
for file names), but GLib has many APIs that deal with nl-terminated
generic C strings that don't have to be in any consistent encoding at
all, or for file names are in the "GLib file name encoding", which is
just a shorter way to say "on POSIX, for existing files, whatever
sequence of non-nul bytes the file name on disk happens to consists
of, and for creating files, the locale encoding".

(On Windows the "GLib file name encoding " *is* UTF-8, because that is
1-1 convertible to/from the on-disk UTF-16 encoding.)

> So there is absolutely no need for "current locale" versions of string handling functions.

That I agree with.

--tml


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