We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 1c1e460 commit 49b3a9dCopy full SHA for 49b3a9d
src/core/vector/qgsvectordataprovider.cpp
@@ -264,7 +264,15 @@ void QgsVectorDataProvider::setEncoding( const QString &e )
264
{
265
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
266
267
- mEncoding = QTextCodec::codecForName( e.toLocal8Bit().constData() );
+ // Use UTF-8 if no encoding is specified
268
+ if ( e.isEmpty() )
269
+ {
270
+ mEncoding = QTextCodec::codecForName( "UTF-8" );
271
+ }
272
+ else
273
274
+ mEncoding = QTextCodec::codecForName( e.toLocal8Bit().constData() );
275
276
if ( !mEncoding && e != QLatin1String( "System" ) )
277
278
if ( !e.isEmpty() )
0 commit comments