diff --git a/python/plugins/sextante/core/LayerExporter.py b/python/plugins/sextante/core/LayerExporter.py index b93350d0cf3..097a25249d5 100644 --- a/python/plugins/sextante/core/LayerExporter.py +++ b/python/plugins/sextante/core/LayerExporter.py @@ -60,7 +60,12 @@ class LayerExporter(): 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): diff --git a/python/plugins/sextante/saga/SagaUtils.py b/python/plugins/sextante/saga/SagaUtils.py index 7036329d75d..d96b2439d21 100644 --- a/python/plugins/sextante/saga/SagaUtils.py +++ b/python/plugins/sextante/saga/SagaUtils.py @@ -76,12 +76,8 @@ class SagaUtils: 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()