changeset 4877:852d4c508f33

(importer) Try to convert paths to UTF-8 for DB insertion
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 25 Jan 2013 10:44:58 +0100
parents 884afa149192
children 82d00b0c7302
files flys-backend/contrib/shpimporter/importer.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/importer.py	Fri Jan 25 10:43:38 2013 +0100
+++ b/flys-backend/contrib/shpimporter/importer.py	Fri Jan 25 10:44:58 2013 +0100
@@ -4,6 +4,7 @@
     import ogr
 import osr
 import shpimporter
+import utils
 
 class Importer:
 
@@ -114,7 +115,7 @@
                                                 path=path)
 
                 if newFeat is not None:
-                    newFeat.SetField("path", path)
+                    newFeat.SetField("path", utils.getUTF8Path(path))
                     newFeat = self.transform(newFeat)
                     res = destLayer.CreateFeature(newFeat)
                     if res is None or res > 0:

http://dive4elements.wald.intevation.org