Opened 14 years ago

Closed 13 years ago

#2551 closed bug (fixed)

SPIT crashes if path to shapefile contains cyrillic

Reported by: dr Owned by:
Priority: major: does not work as expected Milestone: Version 1.5.0
Component: C++ Plugins Version: Trunk
Keywords: Cc: dr, gislab, alexbruy
Must Fix for Release: Yes Platform: Windows
Platform Version: Awaiting user input: no

Description

SPIT crashes if path to shapefile contains cyrillic, for example: "d:\шейп\".

Change History (14)

comment:1 by dr, 14 years ago

Also crashes when cyryllic contains in filename;
If filename contains symbol "-" SPIT returns error message.

comment:2 by jef, 14 years ago

Owner: timlinux removed

comment:3 by pcav, 14 years ago

Does it work with PostGIS Manager plugin?

comment:4 by dr, 14 years ago

With PostGIS Manager QGIS produces an error:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:\Documents and Settings\Administrator/.qgis/python/plugins\postgis_manager\DlgLoadData.py", line 153, in onLoad
    res, err = self.load_data_win(out, args)
  File "C:\Documents and Settings\Administrator/.qgis/python/plugins\postgis_manager\DlgLoadData.py", line 227, in load_data_win
    p = os.popen3(cmdline)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 55-57: ordinal not in range(128)

in reply to:  description comment:5 by jef, 14 years ago

Priority: critical: causes crash or data corruptionmajor: does not work as expected
Resolution: wontfix
Status: newclosed

Replying to dr:

SPIT crashes if path to shapefile contains cyrillic, for example: "d:\шейп\".

No crash reproducable here. QGIS refuses to add files in cyrillic directories on Windows, because OGROpen fails on them. This is a known GDAL/OGR problem: http://trac.osgeo.org/gdal/wiki/rfc5_unicode rfc5_unicode.

I suppose this should be fixed in OGR. See also the thread http://lists.osgeo.org/pipermail/qgis-developer/2010-May/009962.html adding encoding file on the developer's mailing list.

comment:6 by jef, 13 years ago

Resolution: wontfix
Status: closedreopened

comment:7 by jef, 13 years ago

Resolution: upstream
Status: reopenedclosed

comment:8 by rouault, 13 years ago

I'd note that since GDAL 1.8.0, this should now work after the work done in RFC30 (a more focused version of RFC 5), provided that QGIS passes UTF-8 filenames to GDALOpen() / OGROpen()

comment:9 by dr, 13 years ago

If path to file contains Cyrillic symbol SPIT throws an error:

The following Shapefile(s) could not be loaded:

C:/personal/geo/рельеф/sfo.shp
----------------------------------------------------------------------------------------
REASON: File cannot be opened

comment:10 by jef, 13 years ago

Resolution: upstream
Status: closedreopened

in reply to:  8 comment:11 by jef, 13 years ago

Resolution: fixed
Status: reopenedclosed

Replying to rouault:

I'd note that since GDAL 1.8.0, this should now work after the work done in RFC30 (a more focused version of RFC 5), provided that QGIS passes UTF-8 filenames to GDALOpen() / OGROpen()

Thanks. Missed that one. Support for UTF8 in GDAL/OGR 1.8 added in r15148.

comment:12 by dr, 13 years ago

Resolution: fixed
Status: closedreopened

SPIT still crashes if path contains cyrillic, r15154

comment:13 by jef, 13 years ago

should be fixed in r15156.

comment:14 by dr, 13 years ago

Resolution: fixed
Status: reopenedclosed

Works for me now.

Note: See TracTickets for help on using tickets.