Skip to content

Commit f7cce9c

Browse files
committedApr 26, 2013
set SHAPE_ENCODING to "" when creating new shapefile (follows up 4fb9879)
1 parent 5616cfa commit f7cce9c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/providers/ogr/qgsogrprovider.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,6 +1851,9 @@ QGISEXTERN bool createEmptyDataSource( const QString &uri,
18511851
if ( driverName == "ESRI Shapefile" )
18521852
{
18531853
papszOptions = CSLSetNameValue( papszOptions, "ENCODING", encoding.toLocal8Bit().data() );
1854+
// OGR Shapefile fails to create fields if given encoding is not supported by its side
1855+
// so disable encoding conversion of OGR Shapefile layer
1856+
CPLSetConfigOption( "SHAPE_ENCODING", "" );
18541857
}
18551858

18561859
OGRLayerH layer;

0 commit comments

Comments
 (0)
Please sign in to comment.