Skip to content

Commit 2f34f97

Browse files
agiudiceandreanyalldawson
authored andcommittedMar 28, 2023
[OGR] Ensure metadata saved file is UTF-8 encoded
1 parent 3302b02 commit 2f34f97

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/core/providers/ogr/qgsogrprovidermetadata.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,9 @@ bool QgsOgrProviderMetadata::saveLayerMetadata( const QString &uri, const QgsLay
10471047
if ( qmdFile.open( QFile::WriteOnly | QFile::Truncate ) )
10481048
{
10491049
QTextStream fileStream( &qmdFile );
1050+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
1051+
fileStream.setCodec( "UTF-8" );
1052+
#endif
10501053
fileStream << metadataXml;
10511054
qmdFile.close();
10521055
return true;

0 commit comments

Comments
 (0)
Please sign in to comment.