maposmatic-dev
[Top][All Lists]
Advanced

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

[Maposmatic-dev] [PATCH ocitysmap] End (?) of utf8 brain-fucking party


From: David Decotigny
Subject: [Maposmatic-dev] [PATCH ocitysmap] End (?) of utf8 brain-fucking party
Date: Tue, 22 Dec 2009 20:07:17 +0100

---
 ocitysmap/street_index.py |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ocitysmap/street_index.py b/ocitysmap/street_index.py
index 16a026c..368edfe 100644
--- a/ocitysmap/street_index.py
+++ b/ocitysmap/street_index.py
@@ -271,7 +271,6 @@ class OCitySMap:
         locale_path = self.parser.get('ocitysmap', 'locale_path')
         self.i18n = i18n.install_translation(language, locale_path)
         LOG.info('Language: ' + self.i18n.language_code())
-        print _(u"Places of worship")
 
         self.SELECTED_AMENITIES = [
             (_(u"Places of worship"), "place_of_worship", _(u"Places of 
worship")),
@@ -413,7 +412,7 @@ class OCitySMap:
             l = "POLYGON((%f %f, %f %f, %f %f, %f %f, %f %f),(%s))" \
                 % (ymin, xmin, ymin, xmax, ymax, xmax, ymax, xmin, ymin, xmin,
                   inside)
-            print l
+            #print l
             return l
         except:
             # Regexp error: area is not a "simple" polygon
@@ -646,7 +645,7 @@ class OCitySMap:
         # We transform the string representing the squares list into a
         # Python list
         am = [( unicode(amenity[0].decode("utf-8")),
-               unicode(amenity[1].decode("utf-8")),
+                unicode(amenity[1].decode("utf-8")),
                 [ map(int, x.split(',')) for x in amenity[2].split(';')[:-1] ] 
)
               for amenity in am]
 
@@ -730,7 +729,7 @@ class OCitySMap:
             sub_al = cursor.fetchall()
             for a in sub_al:
                 if a[1] == None:
-                    a[1] = human
+                    a[1] = human.encode('utf-8')
             sub_al = self.humanize_amenity_list(sub_al)
             al.extend(sub_al)
 
@@ -797,7 +796,7 @@ class OCitySMap:
             sub_al = cursor.fetchall()
             for a in sub_al:
                 if a[1] == None:
-                    a[1] = human
+                    a[1] = human.encode('utf-8')
             sub_al = self.humanize_amenity_list(sub_al)
             al.extend(sub_al)
 
-- 
1.6.3.3





reply via email to

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