Opened 6 years ago

Closed 6 years ago

#7224 closed enhancement (fixed)

Add support for Hebrew ESRI Shapefile file names

Reported by: zstadler Owned by: warmerdam
Priority: normal Milestone: 2.3.0
Component: default Version: 2.1.3
Severity: normal Keywords: shapefile Hebrew filename

Description (last modified by zstadler)

On Windows 10 command line, the "ESRI Shapefile" driver seems to be unable to open shapefiles where the file name is in Hebrew.

To reproduce:

  1. Download and unzip the attached zip file to a directory of your choice.
  2. cd "fire alert towers"
  3. ogrinfo.exe מגדלי_תצפית_אש.shp

The result is an error message:

Unable to open datasource `?????_?????_??.shp' with the following drivers.
  -> FileGDB
  -> netCDF
  -> JP2OpenJPEG
  -> PDF
  -> DB2ODBC
  -> ESRI Shapefile
  -> MapInfo File

Attachments (1)

fire alert (8.9 KB ) - added by zstadler 6 years ago.

Download all attachments as: .zip

Change History (5)

by zstadler, 6 years ago

Attachment: fire alert added

comment:1 by zstadler, 6 years ago

Description: modified (diff)

comment:2 by zstadler, 6 years ago

Description: modified (diff)

comment:3 by Jukka Rahkonen, 6 years ago

Works for me here in Finland. First I have to change the Windows codepage from the command line with CHCP 1255. I took the code from,

Now ogrinfo works fine with a shapefile that I renamed with file manager by using the name from your question.

ogrinfo מגדלי_תצפית_אש.shp
INFO: Open of `׳ž׳’׳“׳œ׳™_׳×׳¦׳₪׳™׳×_׳׳©.shp'
      using driver `ESRI Shapefile' successful.
1: ׳ž׳’׳“׳œ׳™_׳×׳¦׳₪׳™׳×_׳׳© (Polygon)

The filename in INFO looks different than the name that I used in the command but ogrinfo is still listing all the data fine.


I know that even ESRI supports long and non-ASCII names is shapefiles, but in the one and only published shapefile specification they are not allowed.

Naming Conventions All file names adhere to the 8.3 naming convention. The main file, the index file, and the dBASE file have the same prefix. The prefix must start with an alphanumeric character (a–Z, 0–9), followed by zero or up to seven characters (a–Z, 0–9, _, -). The suffix for the main file is .shp. The suffix for the index file is .shx. The suffix for the dBASE table is .dbf. All letters in a file name are in lower case on operating systems with case sensitive file names

comment:4 by Even Rouault, 6 years ago

Milestone: 2.3.0
Resolution: fixed
Status: newclosed

I believe this issue should be fixed now in trunk with the improvements with Unicode filename handling on command line utilities on Windows

Note: See TracTickets for help on using tickets.