Bug report #14086
gdal tools - proximity (non-ascii characters)
|Affected QGIS version:||2.4.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||up/downstream|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||22096|
While using the proximity tool, If the path of the input or output files include any non-ascii characters, it raises encoding error exception. Although the solution is easy on the user side, projects using this tool becomes hard to maintain, & with a non English OS where most of the paths already include non-ascii characters.
Example input path with Japanese characters:
ERROR 4: `B:\\H27Æ\\F92015040_cshÐ\\z\\03W\\sakatanorth_georeferenced.tif' does not exist in the file system,
and is not recognised as a supported dataset name.
Traceback (most recent call last):
File "C:\\PROGRA~1\\QGISCH~1\\bin\\gdal_proximity.py", line 138, in
print('Unable to open %s' % src_filename)
UnicodeEncodeError: 'ascii' codec can't encode character u'\\u0196' in position 21: ordinal not in range(128)