From: Ethan B. <ebl...@cs...> - 2006-02-09 20:08:13
|
Richard Laager spake unto us the following wisdom: > I ask because we shouldn't be passing UTF-8 to strftime(). So, if > gettext() returns UTF-8 in non-UTF-8 locales, then I need to convert it > in gaim_utf8_strftime(). However, if gettext() does behave as the man > page suggests, doesn't that cause problems with GTK+? There is no reason not to pass UTF-8 to strftime. In UTF-8, % and all of the specifier letters have the same codepoint as ASCII. Gettext returns locale-specific strings, which is why the character set of the translation strings must be specified in the .pofile -- it has to know. I am not sure how Gtk+ handles this; perhaps it assumes that the incoming strings are in the locale charset if they don't validate as UTF-8? I know that Gtk+ _does_ work in non-UTF-8 locales with non-ASCII characters, so... Ethan --=20 The laws that forbid the carrying of arms are laws [that have no remedy for evils]. They disarm only those who are neither inclined nor determined to commit crimes. -- Cesare Beccaria, "On Crimes and Punishments", 1764 |