Skip to content

Commit 707522e

Browse files
author
jef
committed
fix #2903
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14490 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4c6d0e2 commit 707522e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/providers/ogr/qgsogrprovider.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,13 @@ QGISEXTERN bool createEmptyDataSource( const QString &uri,
16651665
//create the attribute fields
16661666

16671667
QTextCodec* codec = QTextCodec::codecForName( encoding.toLocal8Bit().data() );
1668+
if ( !codec )
1669+
{
1670+
// fall back to "System" codec
1671+
codec = QTextCodec::codecForLocale();
1672+
Q_ASSERT( codec );
1673+
}
1674+
16681675

16691676
for ( std::list<std::pair<QString, QString> >::const_iterator it = attributes.begin(); it != attributes.end(); ++it )
16701677
{

0 commit comments

Comments
 (0)