Bug report #2551

SPIT crashes if path to shapefile contains cyrillic

Added by dr - over 14 years ago. Updated almost 14 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:C++ Plugins
Affected QGIS version: Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12611

Description

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

Associated revisions

Revision c7af95b7
Added by Jürgen Fischer almost 14 years ago

add support for UTF8 in GDAL/OGR 1.8 (fixes #2551)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15148 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision a9a50ed1
Added by Jürgen Fischer almost 14 years ago

add support for UTF8 in GDAL/OGR 1.8 (fixes #2551)

git-svn-id: http://svn.osgeo.org/qgis/trunk@15148 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision b7010156
Added by Jürgen Fischer almost 14 years ago

fix #2551

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15156 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 09300f6d
Added by Jürgen Fischer almost 14 years ago

fix #2551

git-svn-id: http://svn.osgeo.org/qgis/trunk@15156 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by dr - over 14 years ago

Also crashes when cyryllic contains in filename;

If filename contains symbol "-" SPIT returns error message.

#2 Updated by Paolo Cavallini over 14 years ago

Does it work with PostGIS Manager plugin?

#3 Updated by dr - over 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)

#4 Updated by Jürgen Fischer over 14 years ago

  • Status changed from Open to Closed
  • Resolution set to wontfix

Replying to dr:

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


I suppose this should be fixed in OGR.  See also the thread [[adding encoding file]] on the developer's mailing list.

#5 Updated by Jürgen Fischer almost 14 years ago

  • Resolution deleted (wontfix)
  • Status changed from Closed to Feedback

#6 Updated by Jürgen Fischer almost 14 years ago

  • Status changed from Feedback to Closed
  • Resolution set to upstream

#7 Updated by Even Rouault almost 14 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()

#8 Updated by dr - almost 14 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

#9 Updated by Jürgen Fischer almost 14 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (upstream)

#10 Updated by Jürgen Fischer almost 14 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

Replying to [comment:8 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 .

#11 Updated by dr - almost 14 years ago

  • Resolution deleted (fixed)
  • Status changed from Closed to Feedback

SPIT still crashes if path contains cyrillic,

#12 Updated by Jürgen Fischer almost 14 years ago

should be fixed in 09300f6d (SVN r15157).

#13 Updated by dr - almost 14 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed

Works for me now.

Also available in: Atom PDF