Skip to content

Commit b087853

Browse files
committed
identify results: consider plain/text wms response and gml attributes as utf-8
1 parent e748281 commit b087853

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/app/qgsidentifyresultsdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,11 +741,11 @@ void QgsIdentifyResultsDialog::addFeature( QgsRasterLayer *layer,
741741
featItem->addChild( attrItem ); // before setHtml()!
742742
if ( !attributes.isEmpty() )
743743
{
744-
attrItem->setContent( attributes.begin().value().toUtf8(), currentFormat == QgsRaster::IdentifyFormatHtml ? "text/html" : "text/plain" );
744+
attrItem->setContent( attributes.begin().value().toUtf8(), currentFormat == QgsRaster::IdentifyFormatHtml ? "text/html" : "text/plain; charset=utf-8" );
745745
}
746746
else
747747
{
748-
attrItem->setContent( tr( "No attributes." ).toUtf8(), "text/plain" );
748+
attrItem->setContent( tr( "No attributes." ).toUtf8(), "text/plain; charset=utf-8" );
749749
}
750750
}
751751
else

src/core/qgsgml.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ QString QgsGml::readAttribute( const QString& attributeName, const XML_Char** at
614614
{
615615
if ( attributeName.compare( attr[i] ) == 0 )
616616
{
617-
return QString( attr[i+1] );
617+
return QString::fromUtf8( attr[i+1] );
618618
}
619619
i += 2;
620620
}

0 commit comments

Comments
 (0)