tags 444927 + confirmed patch upstream
forwarded 444927 http://bugzilla.gnome.org/show_bug.cgi?id=482504
stop

On Tue, Oct 02, 2007, Emil Nowak wrote:
> In 'Modifed' column in gtFileChooser I have date which is sometimes
> represented as week day name. Instead of polish characters I have quotation 
> marks here.
> 
> Every program prints a lot of warnings to console when drawing FileChooser:
> "Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()"
> 
> screenshoot attached.

 The modification time returned by strftime() wasn't properly converted
 from locale encoding to UTF-8; the attached patch fixes the problem for
 me.

-- 
Loïc Minier
GNOME #482504; Debian #444927; Fix warnings and display of modified date / time
in filechooser for some locales as it was missing a locale to UTF-8 conversion

Index: gtk/gtkfilechooserdefault.c
===================================================================
--- gtk/gtkfilechooserdefault.c (revision 18873)
+++ gtk/gtkfilechooserdefault.c (working copy)
@@ -11133,7 +11133,7 @@ list_mtime_data_func (GtkTreeViewColumn 
 	}
 
       if (strftime (buf, sizeof (buf), format, &tm_mtime) != 0)
-        date_str = g_strdup (buf);
+        date_str = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
       else
 	date_str = g_strdup (_("Unknown"));
     }

Reply via email to