From: Richard L. <rl...@wi...> - 2006-02-10 18:54:35
|
On Thu, 2006-02-09 at 21:09 +0100, Bjoern Voigt wrote: > I also do not see a solution in converting the UTF-8 date/time string > before passing into strftime(). Since the UTF-8 chars are needed (for > instance in Chinese), you had to convert the charset twice: > 1) UTF-8 (gettext-output) to ASCII (strftime-input) > 2) ASCII to UTF-8 (strftime-out) to GTK+ Not ASCII, but locale format. The formatters passed to strftime() expand to strings in locale format. Thus, to use them in Gaim, we convert the output of strftime() to UTF-8. Now, what happens if we pass in a UTF-8 string (including formatters) to strftime()? We get output that consists of a combination of locale and UTF-8 format. Obviously, this works if the locale format is UTF-8. But, if the local format is an 8 bit character set, it seems to me like things wouldn't work. I imagine the correct approach is this: 1. Pass the format string from Gaim to gettext(). 2. Convert the output from gettext() from UTF-8 to locale format. 3. Pass the translated, locale-converted string to strftime(). 4. Convert the output of strftime() back to UTF-8. Thoughts? Richard |