diff flys-backend/contrib/shpimporter/utils.py @ 4887:1f6e544f7a7f

Importer: Use cp1252 instead of latin-9 to guess filename encodings
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 28 Jan 2013 12:45:41 +0100
parents b457532dae63
children c0a58558b817
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/utils.py	Mon Jan 28 12:44:41 2013 +0100
+++ b/flys-backend/contrib/shpimporter/utils.py	Mon Jan 28 12:45:41 2013 +0100
@@ -29,5 +29,5 @@
     try:
         return unicode.encode(unicode(path, sys.getfilesystemencoding()), "UTF-8")
     except UnicodeDecodeError:
-        # Probably Windows iso-8859-x names so lets try again
-        return unicode.encode(unicode(path, "iso-8859-15"), "UTF-8")
+        # Probably European Windows names so lets try again
+        return unicode.encode(unicode(path, "cp1252"), "UTF-8")

http://dive4elements.wald.intevation.org