Opened 11 years ago

Closed 6 years ago

#2141 closed defect (fixed)

Linking or importing raster with non-ascii characters in filename fails in wxGUI with UnicodeEncodeError

Reported by: torsti Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: wxGUI Version: svn-trunk
Keywords: Cc:
CPU: x86-64 Platform: Linux

Description

GRASS SVN Revision: 58403

When attempting to import or link a raster with a non-ascii basename the wxGUI dialog, after selecting the file, does not provide a layer for selection.

Traceback from Command console output from r.external, but same happens with r.in.gdal:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-
packages/wx-2.8-gtk2-unicode/wx/lib/filebrowsebutton.py",
line 140, in OnChanged

self.changeCallback(evt)
  File "/usr/local/grass-7.0.svn/etc/gui/wxpython/gui_core/g
select.py", line 1813, in OnUpdate

self._reloadLayers()
  File "/usr/local/grass-7.0.svn/etc/gui/wxpython/gui_core/g
select.py", line 1849, in _reloadLayers

grassName = GetValidLayerName(baseName.split('.', -1)[0])
  File
"/usr/local/grass-7.0.svn/etc/gui/wxpython/core/utils.py",
line 201, in GetValidLayerName

retName = str(name).strip()
UnicodeEncodeError
:
'ascii' codec can't encode character u'\xf6' in position 18:
ordinal not in range(128)

The filename in question: /home/torsti/lähdeaineistot/Kansalliskirjasto/pitäjänkartta/VVJ/670-253 - 1945 - Röykkä - 1.tif. The $GISDBASE path does not contain non-ascii characters and importing/linking files where any path component except the filename/basename contains non-ascii characters does work, e.g. importing the same file with Roykka substituted for Röykkä is ok.

Change History (5)

comment:1 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:2 by martinl, 8 years ago

Still an issue?

comment:3 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:4 by neteler, 7 years ago

Milestone: 7.0.67.0.7

comment:5 by martinl, 6 years ago

Milestone: 7.0.77.6.2
Resolution: fixed
Status: newclosed

Unable to reproduce (7.6.1).

Note: See TracTickets for help on using tickets.