straw-devel
[Top][All Lists]
Advanced

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

[Straw-devel] [PATCH]: unicode problem


From: Terje Rosten
Subject: [Straw-devel] [PATCH]: unicode problem
Date: Mon, 18 Aug 2003 19:31:24 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

I need the attached patch to fix a problem if the abbreviated weekday
name of the date in question contains a non-ascii character.

Thanks,


  - Terje


Index: src/lib/MainWindow.py
===================================================================
RCS file: /cvsroot/straw/straw/src/lib/MainWindow.py,v
retrieving revision 1.70
diff -u -r1.70 MainWindow.py
--- src/lib/MainWindow.py       18 Aug 2003 08:32:52 -0000      1.70
+++ src/lib/MainWindow.py       18 Aug 2003 17:22:38 -0000
@@ -151,8 +151,9 @@
         if item.title is not None:
             ret.append('<div class="stitle">%s</div>' % item.title)
         if item.pub_date is not None:
+            format = '%a, %d %b %H:%M:%S'
             ret.append('<div class="sdate">%s</div>' %
-            str(item.pub_date.localtime().strftime('%a, %d %b %H:%M:%S')))
+            
unicode(item.pub_date.localtime().strftime(format),'latin-1').encode('utf-8'))  
                     
         ret.append('<div class="content">')
         if item.description is not None:
             ret.append('%s ' % item.description)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]