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 7fb46498c9fb3c14a2d0b0fcc8e634dba2f1cade
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/qgsvectorfilewriter.cpp
@@ -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.