GNOME Bugzilla – Bug 116265
Renders invisible when LC_TIME is set
Last modified: 2004-12-22 21:47:04 UTC
Description of Problem: Steps to reproduce the problem: 1. Generate locales for da_DK, set system default to C/POSIX. 2. In your .gnomerc put: LC_TIME=da_DK; export LC_TIME 3. Set GDM language to C/POSIX when logging in. 4. Choose "clock_applet -> Preferences -> Show date" (enable) Actual Results: Applet renders invisible. Expected Results: Applet shows date and time in Danish format. How often does this happen? Always. Additional Information: If you log in with GDM language "Danish", it works. But the applet should respect when LC_TIME is set, since some users (including me) only use some of the locale-vars. It would be strange when system default is C/POSIX, that you would have to select GDM language Danish and then in your .gnomerc set everything (except LC_TIME) back to C/POSIX to get the applet to show Danish dates. Reported to Debian, but not fixed: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=199142 -- System Information: Debian Release: testing/unstable Architecture: i386 Kernel: Linux gnu 2.4.19-k7 #1 Tue Nov 19 03:01:13 EST 2002 i686 Locale: LANG=C, LC_CTYPE=C Package: gnome-panel-data Version: 2.2.2-1 Versions of packages gnome-panel-data depends on: ii gnome-panel 2.2.2-1 ii scrollkeeper 0.3.12-2
This is probably because of conflicting locales. Clock uses libc to format the time using strftime. This is affected by LC_TIME and thus puts latin1 characters in the buffer. It then tries to convert this to UTF-8 using g_locale_to_utf8. Now, since you are using the 'C' locale, which is ASCII, it finds invalid characters and can't do the conversion. Try setting your default locale to some other neutral locale like en_US, whose character coding actually matches your LC_TIME.
I don't know much about how locales work (latin1 / UTF8 / etc), sorry. Using default en_US instead of POSIX/C works for me, thanks! Sorry I had to bother you guys. I'll leave it up to the maintainer to close it.