Skip to content
Permalink
Browse files

applied fix for #6127 (problems with non-ascii strings

  • Loading branch information
volaya committed Nov 15, 2012
1 parent 6302751 commit abbe25f920690ff208ccaa2171637a375056406e
Showing with 7 additions and 6 deletions.
  1. +6 −1 python/plugins/sextante/core/LayerExporter.py
  2. +1 −5 python/plugins/sextante/saga/SagaUtils.py
@@ -60,7 +60,12 @@ def exportVectorLayer(layer):
del writer
return output
else:
if (not unicode(layer.source()).endswith("shp")):
isASCII=True
try:
unicode(layer.source()).decode("ascii")
except UnicodeEncodeError:
isASCII=False
if (not unicode(layer.source()).endswith("shp") or not isASCII):
writer = QgsVectorFileWriter( output, systemEncoding,provider.fields(), provider.geometryType(), provider.crs() )
feat = QgsFeature()
while provider.nextFeature(feat):
@@ -76,12 +76,8 @@ def createSagaBatchJobFileFromSagaCommands(commands):
fout.write("PATH=PATH;%SAGA%;%SAGA_MLB%\n");
else:
pass
#fout.write("export SAGA_MLB=" + SagaUtils.sagaPath() + os.sep + "modules" + "\n");
#fout.write("PATH=$PATH:" + SagaUtils.sagaPath() + os.sep + "modules" + "\n");
#fout.write("export PATH\n");

for command in commands:
fout.write("saga_cmd " + command + "\n")
fout.write("saga_cmd " + command.encode("utf8") + "\n")

fout.write("exit")
fout.close()

0 comments on commit abbe25f

Please sign in to comment.
You can’t perform that action at this time.