Skip to content
Permalink
Browse files

ogr provider: don't ignore set encoding if SHAPE_ENCODING is set alth…

…ough OGR

still claims that strings are already UTF-8
  • Loading branch information
jef-n committed Apr 12, 2013
1 parent 95f49be commit fea86ea176323e2b6e1071392e385fb1b52d732a
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -503,7 +503,8 @@ QStringList QgsOgrProvider::subLayers() const
void QgsOgrProvider::setEncoding( const QString& e )
{
#if defined(OLCStringsAsUTF8)
if ( !OGR_L_TestCapability( ogrLayer, OLCStringsAsUTF8 ) )
QSettings settings;
if ( settings.value( "/qgis/ignoreShapeEncoding", true ).toBool() && !OGR_L_TestCapability( ogrLayer, OLCStringsAsUTF8 ) )
{
QgsVectorDataProvider::setEncoding( e );
}

1 comment on commit fea86ea

@minorua

This comment has been minimized.

Copy link
Contributor

@minorua minorua commented on fea86ea Apr 13, 2013

In case that ignoreShapeEncoding option is off, even if TestCapability( OLCStringsAsUTF8 ) returns false (i.e. case of LDID/0), users cannnot select the encoding and then LDID/0 file is handled as UTF-8 file. Is this correct? Or I guess the logical operator is wrong.

Please sign in to comment.
You can’t perform that action at this time.