gnome-desktop r5074 - trunk/gnome-about



Author: vuntz
Date: Mon May  5 16:02:09 2008
New Revision: 5074
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5074&view=rev

Log:
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>


Modified:
   trunk/gnome-about/ChangeLog
   trunk/gnome-about/gnome-about.in

Modified: trunk/gnome-about/gnome-about.in
==============================================================================
--- trunk/gnome-about/gnome-about.in	(original)
+++ trunk/gnome-about/gnome-about.in	Mon May  5 16:02:09 2008
@@ -38,7 +38,7 @@
 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 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
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]