Ticket #2551 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

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
Platform Version: Platform: Windows
Must Fix for Release: Yes Awaiting user input: no

Description

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

Change History

  Changed 3 years ago by dr

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

  Changed 3 years ago by jef

  • owner timlinux deleted

  Changed 3 years ago by pcav

Does it work with PostGIS Manager plugin?

  Changed 3 years ago by dr

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   Changed 3 years ago by jef

  • priority changed from critical: causes crash or data corruption to major: does not work as expected
  • status changed from new to closed
  • resolution set to wontfix

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: [ rfc5_unicode].

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

  Changed 2 years ago by jef

  • status changed from closed to reopened
  • resolution wontfix deleted

  Changed 2 years ago by jef

  • status changed from reopened to closed
  • resolution set to upstream

follow-up: ↓ 11   Changed 2 years ago by 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()

  Changed 2 years ago by dr

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

  Changed 2 years ago by jef

  • status changed from closed to reopened
  • resolution upstream deleted

in reply to: ↑ 8   Changed 2 years ago by jef

  • status changed from reopened to closed
  • resolution set to fixed

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.

  Changed 2 years ago by dr

  • status changed from closed to reopened
  • resolution fixed deleted

SPIT still crashes if path contains cyrillic, r15154

  Changed 2 years ago by jef

should be fixed in r15156.

  Changed 2 years ago by dr

  • status changed from reopened to closed
  • resolution set to fixed

Works for me now.

Note: See TracTickets for help on using tickets.