Skip to content

Commit ba2a205

Browse files
committed
support for cyrillic symbols in raster metadata (fix #4452)
1 parent bafa99c commit ba2a205

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/providers/gdal/qgsgdalprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ QString QgsGdalProvider::metadata()
367367
myMetadata += tr( "Dataset Description" );
368368
myMetadata += "</p>\n";
369369
myMetadata += "<p>";
370-
myMetadata += QFile::decodeName( GDALGetDescription( mGdalDataset ) );
370+
myMetadata += FROM8( GDALGetDescription( mGdalDataset ) );
371371
myMetadata += "</p>\n";
372372

373373

src/providers/gdal/qgsgdalprovider.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ class QgsRasterPyramid;
4141

4242
#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 1800
4343
#define TO8F(x) (x).toUtf8().constData()
44+
#define FROM8(x) QString::fromUtf8(x)
4445
#else
4546
#define TO8F(x) QFile::encodeName( x ).constData()
47+
#define FROM8(x) QString::fromLocal8Bit(x)
4648
#endif
4749

4850

0 commit comments

Comments
 (0)