Skip to content
Permalink
Browse files

Don't force set new layer encoding to the UI/encoding settings value

This was previously a band-aid fix applied in order to get shapefiles
to load using the encoding specified in the data source manager
encoding option.

But the same settings key is used for lots of different things, e.g.
saving and restoring the last used encoding when creating a new layer.

By forcing all layers to this encoding leads to lots of nasty issues,
e.g. shapefiles loaded through the QGIS api will get a quasi-random
encoding assigned to them (unless the API caller manually follows up
with a setEncoding() call...)

It's no longer required now, in any case
  • Loading branch information
nyalldawson committed Feb 10, 2020
1 parent f36bd8f commit c0581ff12e226cae2a8296b7f955f85d09fa241c
Showing with 0 additions and 2 deletions.
  1. +0 −2 src/core/qgsvectordataprovider.cpp
@@ -38,8 +38,6 @@
QgsVectorDataProvider::QgsVectorDataProvider( const QString &uri, const ProviderOptions &options )
: QgsDataProvider( uri, options )
{
QgsSettings settings;
setEncoding( settings.value( QStringLiteral( "UI/encoding" ), "System" ).toString() );
}

QString QgsVectorDataProvider::storageType() const

0 comments on commit c0581ff

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