Permalink
Browse files

.decode(utf-8) is now called in fastkml already so no use to do it ag…

…ain here
  • Loading branch information...
cleder committed Dec 20, 2012
1 parent 0189c23 commit e4059b5e65972e8be753c0b0751cad2418664f48
Showing with 3 additions and 6 deletions.
  1. +2 −6 collective/geo/fastkml/browser/kmldocument.py
  2. +1 −0 collective/geo/fastkml/configure.zcml
@@ -84,10 +84,10 @@ def get_kml(self):
pm.styleUrl = "#defaultStyle"
doc.append(pm)
if getConfiguration().debug_mode:
- xml = '<?xml version="1.0" encoding="UTF-8"?>' + \
+ xml = u'<?xml version="1.0" encoding="UTF-8"?>' + \
k.to_string(prettyprint=True)
else:
- xml = '<?xml version="1.0" encoding="UTF-8"?>' + k.to_string()
+ xml = u'<?xml version="1.0" encoding="UTF-8"?>' + k.to_string()
return xml
def __call__(self):
@@ -98,10 +98,6 @@ def __call__(self):
self.request.response.setHeader('Content-Type',
'application/vnd.google-earth.kml+xml; charset=utf-8')
xml = self.get_kml()
- try:
- xml = xml.decode('utf-8', 'ignore')
- except:
- pass
return xml.encode('utf-8')
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:five="http://namespaces.zope.org/five"

0 comments on commit e4059b5

Please sign in to comment.