Opened 9 years ago

Closed 5 years ago

#6130 closed defect (wontfix)

OGR.FileGDB support for UTF-8 paths fix

Reported by: danielzeitlin Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

std::string FGDBLaunderName(const std::string name) has a bug. It simply breakes UTF-8 support completely (for paths and tables name). The following 'for' must be removed (it's bad):

for(size_t i=0; i < newName.size(); i++)
    {
        if ( !( newName[i] == '_' ||
              ( newName[i]>='0' && newName[i]<='9') ||
              ( newName[i]>='a' && newName[i]<='z') || 
              ( newName[i]>='A' && newName[i]<='Z') ))
        {
            newName[i] = '_';
        }
    }

Patch is attached.

Attachments (1)

unicode.patch (587 bytes ) - added by danielzeitlin 9 years ago.

Download all attachments as: .zip

Change History (7)

by danielzeitlin, 9 years ago

Attachment: unicode.patch added

comment:1 by Even Rouault, 9 years ago

A better fix would be to add a LAUNDER=YES/NO layer creation option as in other drivers to enable/disable name laundering.

comment:2 by danielzeitlin, 9 years ago

In any case LAUNDER=NO should be default for FileGDB driver.

comment:3 by Even Rouault, 9 years ago

I wonder what you mean exactly with "paths". As far as I can see, FGDBLaunderName() is used to launder table/layer names and field names. This shouldn't affect filesystem paths.

comment:4 by danielzeitlin, 9 years ago

I think you right, it's only table name, but still table name must not be laundered by default. We use Hebrew language for table names here and such if test on chars is bad. First it should convert name to Unicode and only than check using w_char.

comment:5 by Even Rouault, 7 years ago

https://trac.osgeo.org/gdal/ticket/4466 mentions a number of restrictions on layre names. Can you confirm that ArcGIS support Hebrew language for table name. An example .gdb with that would help confirming.

comment:6 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.