Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #561 from minorua/create_shape
set SHAPE_ENCODING to "" when creating new shapefile
  • Loading branch information
borysiasty committed Apr 26, 2013
2 parents 02fa729 + f7cce9c commit f384277
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -1851,6 +1851,9 @@ QGISEXTERN bool createEmptyDataSource( const QString &uri,
if ( driverName == "ESRI Shapefile" )
{
papszOptions = CSLSetNameValue( papszOptions, "ENCODING", encoding.toLocal8Bit().data() );
// OGR Shapefile fails to create fields if given encoding is not supported by its side
// so disable encoding conversion of OGR Shapefile layer
CPLSetConfigOption( "SHAPE_ENCODING", "" );
}

OGRLayerH layer;
Expand Down

0 comments on commit f384277

Please sign in to comment.