Skip to content
Permalink
Browse files
also optionally apply SHAPE_ENCODING to layer creation (fixes #5911)
  • Loading branch information
jef-n committed Feb 16, 2013
1 parent f22c62a commit 7fb4649
Showing 1 changed file with 4 additions and 1 deletion.
@@ -97,6 +97,10 @@ QgsVectorFileWriter::QgsVectorFileWriter(
// find driver in OGR
OGRSFDriverH poDriver;
QgsApplication::registerOgrDrivers();

QSettings settings;
CPLSetConfigOption( "SHAPE_ENCODING", settings.value( "/qgis/ignoreShapeEncoding", true ).toBool() ? "" : 0 );

poDriver = OGRGetDriverByName( ogrDriverName.toLocal8Bit().data() );

if ( poDriver == NULL )
@@ -216,7 +220,6 @@ QgsVectorFileWriter::QgsVectorFileWriter(
{
QgsDebugMsg( "error finding QTextCodec for " + fileEncoding );

QSettings settings;
QString enc = settings.value( "/UI/encoding", "System" ).toString();
mCodec = QTextCodec::codecForName( enc.toLocal8Bit().constData() );
if ( !mCodec )

0 comments on commit 7fb4649

Please sign in to comment.