From ceace5bdcaff1a438fc75794d9a263ffff235012 Mon Sep 17 00:00:00 2001 From: Fredrik Unger Date: Wed, 16 May 2012 12:08:02 +0200 Subject: [PATCH] Fixing UTF-8 encoding for the foreign texts and characters. --- xinclude/openinghours.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xinclude/openinghours.py b/xinclude/openinghours.py index aab8220..641aec4 100755 --- a/xinclude/openinghours.py +++ b/xinclude/openinghours.py @@ -22,10 +22,10 @@ loc_alias = { } title = { - 'sv': 'Öppningstider', - 'de': 'Öffnungszeiten', - 'en': 'Opening hours', - 'cs': 'Otevírací doba', + 'sv': u'Öppningstider', + 'de': u'Öffnungszeiten', + 'en': u'Opening hours', + 'cs': u'Otevírací doba', } day_header = { 'sv': 'Dag', @@ -69,7 +69,7 @@ for b in blocks: for d in days: times[int(d)] = t -out = '' +out = u'' out += ''''''+title[lang]+''' @@ -97,4 +97,4 @@ out += '''
''' -sys.stdout.write(out.decode('utf-8')) +sys.stdout.write(out.encode('utf-8')) -- 2.30.2