Re: Quotation marks: Using =?UTF-8?B?4oCc4oCd?= instead of ""



> Since you don't know whether the result of _("foo") will be strict ASCII,
> you must always treat it as if it were not. GLib/GTK+ *requires* UTF-8
> strings for all (most?) of its string handling functions...

GTK/Glib are not the biggest problem here. You also use C library
functions in Gnome applications. Glib/Gtk+ works with the C library in C
locale simply because ASCII is a subset of UTF-8. That ceases to work the
moment you introduce UTF-8 bytesequences into non utf-8 locales.

> ...so afaics calling these non-UTF8 aware functions is a bug regardless of
> the current locale.

You are completely wrong. These functions are *locale* aware. In a non
utf-8 locale they take non-utf8 input. In a utf-8 locale they take utf-8
input. Feeding them the wrong thing is broken and will give wrong answers.

> > You've also ignored the fact that output of utf-8 bytes in a non utf-8
> > mode is going to have undefined results as well.
> 
> All output must be handled by g_print, not by printf so this is also a
> non-issue I think.

What about printing to files ? An "nm" also rather suggests that gnome
apps do use printf and fprintf somewhat and many of the other functions
mentioned. syslog() is another that is used.


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