gnome-desktop r5075 - branches/gnome-2-22/gnome-about



Author: vuntz
Date: Mon May  5 16:02:22 2008
New Revision: 5075
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5075&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:
   branches/gnome-2-22/gnome-about/ChangeLog
   branches/gnome-2-22/gnome-about/gnome-about.in

Modified: branches/gnome-2-22/gnome-about/gnome-about.in
==============================================================================
--- branches/gnome-2-22/gnome-about/gnome-about.in	(original)
+++ branches/gnome-2-22/gnome-about/gnome-about.in	Mon May  5 16:02:22 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]