summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <vuntz@gnome.org>2008-05-05 16:02:22 +0000
committerVincent Untz <vuntz@src.gnome.org>2008-05-05 16:02:22 +0000
commitcfeb80749dcc3e5146e039c318ba32d39b0d058a (patch)
tree3e0cdfd71f4dc25995332af1f2827ac2b1f8ead1
parentbcd12e0ca6787e1cd5d22a393a3dcb6d0af6fe58 (diff)
downloadgnome-desktop-cfeb80749dcc3e5146e039c318ba32d39b0d058a.tar.gz
convert the strftime() output to UTF-8 Fix bug #530382 Patch by Takao
2008-05-05 Vincent Untz <vuntz@gnome.org> * gnome-about.in: convert the strftime() output to UTF-8 Fix bug #530382 Patch by Takao Fujiwara <takao.fujiwara@sun.com> svn path=/branches/gnome-2-22/; revision=5075
-rw-r--r--gnome-about/ChangeLog6
-rw-r--r--gnome-about/gnome-about.in5
2 files changed, 9 insertions, 2 deletions
diff --git a/gnome-about/ChangeLog b/gnome-about/ChangeLog
index 06429eac..a4e13037 100644
--- a/gnome-about/ChangeLog
+++ b/gnome-about/ChangeLog
@@ -1,5 +1,11 @@
2008-05-05 Vincent Untz <vuntz@gnome.org>
+ * gnome-about.in: convert the strftime() output to UTF-8
+ Fix bug #530382
+ Patch by Takao Fujiwara <takao.fujiwara@sun.com>
+
+2008-05-05 Vincent Untz <vuntz@gnome.org>
+
* gnome-about.in: don't skip the last description from
gnome-version.xml.
Patch by Matt Keenan <matt.keenan@sun.com>. Fix bug #530904.
diff --git a/gnome-about/gnome-about.in b/gnome-about/gnome-about.in
index 85af4216..ec07029c 100644
--- a/gnome-about/gnome-about.in
+++ b/gnome-about/gnome-about.in
@@ -38,7 +38,7 @@ import gnome
import cairo
from math import pi
-import os, sys, random, time, gettext
+import os, sys, random, time, gettext, locale
import xml.dom.minidom
@@ -83,7 +83,8 @@ def locate_file (program, file):
def cleanup_date (date):
'''Parse a date as found in gnome-version.xml and nicely format it'''
try:
- return time.strftime ("%x", time.strptime (date, "%Y-%m-%d"))
+ # FIXME: we don't have g_locale_to_utf8 in python. See bug #530382
+ return unicode (time.strftime ("%x", time.strptime (date, "%Y-%m-%d")), locale.getpreferredencoding ()).encode ("utf-8")
except:
return False