Skip to content

Commit

Permalink
support for cyrillic symbols in raster metadata (fix #4452)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 26, 2011
1 parent d169b5a commit e53c4aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -372,7 +372,7 @@ QString QgsGdalProvider::metadata()
myMetadata += tr( "Dataset Description" );
myMetadata += "</p>\n";
myMetadata += "<p>";
myMetadata += QFile::decodeName( GDALGetDescription( mGdalDataset ) );
myMetadata += FROM8( GDALGetDescription( mGdalDataset ) );
myMetadata += "</p>\n";


Expand Down
8 changes: 8 additions & 0 deletions src/providers/gdal/qgsgdalprovider.h
Expand Up @@ -38,6 +38,14 @@ class QgsRasterPyramid;
#define CPL_SUPRESS_CPLUSPLUS
#include <gdal.h>

#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 1800
#define TO8F(x) (x).toUtf8().constData()
#define FROM8(x) QString::fromUtf8(x)
#else
#define TO8F(x) QFile::encodeName( x ).constData()
#define FROM8(x) QString::fromLocal8Bit(x)
#endif

/** \ingroup core
* A call back function for showing progress of gdal operations.
*/
Expand Down

0 comments on commit e53c4aa

Please sign in to comment.