Skip to content

Commit 8b48638

Browse files
committed
WMS identify GML: clear bytearrya before encoding to utf8, fixes "invalid token"
1 parent 54da1cf commit 8b48638

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/providers/wms/qgswmsprovider.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4459,10 +4459,13 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
44594459
// http://sourceforge.net/p/expat/bugs/498/
44604460
QDomDocument dom;
44614461
dom.setContent( gmlByteArray ); // gets XML encoding
4462+
gmlByteArray.clear();
44624463
QTextStream stream( &gmlByteArray );
44634464
stream.setCodec( QTextCodec::codecForName( "UTF-8" ) );
44644465
dom.save( stream, 4, QDomNode::EncodingFromTextStream );
44654466

4467+
QgsDebugMsg( "GML UTF-8 (first 2000 bytes):\n" + gmlByteArray.left( 2000 ) );
4468+
44664469
QGis::WkbType wkbType;
44674470
QgsGmlSchema gmlSchema;
44684471

0 commit comments

Comments
 (0)