Skip to content
Permalink
Browse files

Followup 2675c42

  • Loading branch information
m-kuhn committed Jul 13, 2016
1 parent 2675c42 commit c226e57a9b270d65349bef609226eaf8446846ab
Showing with 8 additions and 14 deletions.
  1. +8 −14 src/core/qgsvectordataprovider.cpp
@@ -132,24 +132,18 @@ int QgsVectorDataProvider::capabilities() const

void QgsVectorDataProvider::setEncoding( const QString& e )
{
QTextCodec* ncodec = QTextCodec::codecForName( e.toLocal8Bit().constData() );
if ( ncodec )
mEncoding = QTextCodec::codecForName( e.toLocal8Bit().constData() );

if ( !mEncoding && e != "System" )
{
mEncoding = ncodec;
QgsMessageLog::logMessage( tr( "Codec %1 not found. Falling back to system locale" ).arg( e ) );
mEncoding = QTextCodec::codecForName( "System" );
}
else
{
if ( e != "System" )
{
QgsMessageLog::logMessage( tr( "Codec %1 not found. Falling back to system locale" ).arg( e ) );
mEncoding = QTextCodec::codecForName( "System" );
}

if ( !mEncoding )
mEncoding = QTextCodec::codecForLocale();
if ( !mEncoding )
mEncoding = QTextCodec::codecForLocale();

Q_ASSERT( mEncoding );
}
Q_ASSERT( mEncoding );
}

QString QgsVectorDataProvider::encoding() const

0 comments on commit c226e57

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