mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
fix issues with non-ASCII filenames in GDALTools, thanks to Evgenia for
pointing on this problem
This commit is contained in:
parent
dd1bb457d2
commit
8970a1fde5
@ -802,6 +802,7 @@ def setProcessEnvironment(process):
|
||||
envvar_list = {
|
||||
"PATH" : getGdalBinPath(),
|
||||
"PYTHONPATH" : getGdalPymodPath()
|
||||
"GDAL_FILENAME_IS_UTF8" : "NO"
|
||||
}
|
||||
|
||||
sep = os.pathsep
|
||||
|
@ -199,15 +199,14 @@ class GdalToolsBaseDialog(QDialog, Ui_Dialog):
|
||||
return
|
||||
|
||||
if self.command.find( "gdalinfo" ) != -1 and exitCode == 0:
|
||||
print "*** DEBUG ***"
|
||||
self.emit( SIGNAL("finished(bool)"), self.loadCheckBox.isChecked() )
|
||||
self.stop()
|
||||
return
|
||||
|
||||
# show the error message if there's one, otherwise show the process output message
|
||||
msg = QString(self.process.readAllStandardError())
|
||||
msg = QString.fromLocal8Bit(self.process.readAllStandardError())
|
||||
if msg.isEmpty():
|
||||
outMessages = QString(self.process.readAllStandardOutput()).split( "\n" )
|
||||
outMessages = QString.fromLocal8Bit(self.process.readAllStandardOutput()).split( "\n" )
|
||||
|
||||
# make sure to not show the help
|
||||
for m in outMessages:
|
||||
|
@ -101,7 +101,7 @@ class GdalToolsDialog( QWidget, Ui_Widget, BasePluginWidget ):
|
||||
arr = QByteArray()
|
||||
arr = self.base.process.readAllStandardOutput()
|
||||
if platform.system() == "Windows":
|
||||
info = QString( arr ).trimmed().split( "\r\n" )
|
||||
info = QString.fromLocal8Bit( arr ).trimmed().split( "\r\n" )
|
||||
else:
|
||||
info = QString( arr ).trimmed().split( "\n" )
|
||||
self.rasterInfoList.addItems( info )
|
||||
|
@ -182,7 +182,7 @@ class GdalToolsDialog( QWidget, Ui_Widget, BaseBatchWidget ):
|
||||
BasePluginWidget.onFinished(self, exitCode, status)
|
||||
return
|
||||
|
||||
msg = QString( self.base.process.readAllStandardError() )
|
||||
msg = QString.fromLocal8Bit( self.base.process.readAllStandardError() )
|
||||
if not msg.isEmpty():
|
||||
self.errors.append( ">> " + self.inFiles[self.batchIndex] + "<br>" + msg.replace( "\n", "<br>" ) )
|
||||
|
||||
|
@ -112,7 +112,7 @@ class GdalToolsBaseBatchWidget(BasePluginWidget):
|
||||
BasePluginWidget.onFinished(self, exitCode, status)
|
||||
return
|
||||
|
||||
msg = QString( self.base.process.readAllStandardError() )
|
||||
msg = QString.fromLocal8Bit( self.base.process.readAllStandardError() )
|
||||
if not msg.isEmpty():
|
||||
self.errors.append( ">> " + self.inFiles[self.batchIndex] + "<br>" + msg.replace( "\n", "<br>" ) )
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user