File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -892,15 +892,16 @@ QStringList QgsOgrProvider::_subLayers( bool withFeatureCount ) const
892
892
void QgsOgrProvider::setEncoding ( const QString &e )
893
893
{
894
894
QgsSettings settings;
895
- if ( ( mGDALDriverName == QLatin1String ( " ESRI Shapefile" ) && settings.value ( QStringLiteral ( " qgis/ignoreShapeEncoding" ), true ).toBool () ) || !mOgrLayer ->TestCapability ( OLCStringsAsUTF8 ) )
895
+ if ( ( mGDALDriverName == QLatin1String ( " ESRI Shapefile" ) &&
896
+ settings.value ( QStringLiteral ( " qgis/ignoreShapeEncoding" ), true ).toBool () ) ||
897
+ ( mOgrLayer && !mOgrLayer ->TestCapability ( OLCStringsAsUTF8 ) ) )
896
898
{
897
899
QgsVectorDataProvider::setEncoding ( e );
898
900
}
899
901
else
900
902
{
901
903
QgsVectorDataProvider::setEncoding ( QStringLiteral ( " UTF-8" ) );
902
904
}
903
-
904
905
loadFields ();
905
906
}
906
907
You can’t perform that action at this time.
0 commit comments