Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=gfpm.git;a=commitdiff;h=4f9351a71fb0c289250fd6723545f7e1db0cb643
commit 4f9351a71fb0c289250fd6723545f7e1db0cb643 Author: Priyank <priy...@frugalware.org> Date: Sat May 30 15:14:33 2009 +0530 gfpm-logviewer: Convert the output of strftime() to valid utf-8 before displaying it * Fixes problem of accents not being shown correctly in languages like fr_FR * Closes #3714 diff --git a/src/gfpm-logviewer.c b/src/gfpm-logviewer.c index cbfa1a8..7dd5761 100644 --- a/src/gfpm-logviewer.c +++ b/src/gfpm-logviewer.c @@ -180,8 +180,11 @@ _gfpm_logviewer_populate (void) prev_year = (t->tm_year+1900); if (prev_month != (t->tm_mon+1)) { - char day[64] = ""; - strftime (day, 64, "%B %Y", t); + char tday[64] = ""; + char *day = NULL; + strftime (tday, 64, "%B %Y", t); + /* convert to utf-8 */ + day = g_convert (tday, strlen(tday), "UTF-8", "", NULL, NULL, NULL); prev_month = t->tm_mon+1; li = (LogViewItem*) malloc(sizeof(LogViewItem)); @@ -193,8 +196,11 @@ _gfpm_logviewer_populate (void) } if (prev_month != (t->tm_mon+1)) { - char day[64] = ""; - strftime (day, 64, "%B %Y", t); + char tday[64] = ""; + char *day = NULL; + strftime (tday, 64, "%B %Y", t); + /* convert to utf-8 */ + day = g_convert (tday, strlen(tday), "UTF-8", "", NULL, NULL, NULL); li = (LogViewItem*) malloc(sizeof(LogViewItem)); prev_month = t->tm_mon+1; li->label = g_strdup (day); _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git