Skip to content

Commit

Permalink
WMS identify GML: clear bytearrya before encoding to utf8, fixes "inv…
Browse files Browse the repository at this point in the history
…alid token"
  • Loading branch information
blazek committed Feb 14, 2014
1 parent 54da1cf commit 8b48638
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/providers/wms/qgswmsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4459,10 +4459,13 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
// http://sourceforge.net/p/expat/bugs/498/
QDomDocument dom;
dom.setContent( gmlByteArray ); // gets XML encoding
gmlByteArray.clear();
QTextStream stream( &gmlByteArray );
stream.setCodec( QTextCodec::codecForName( "UTF-8" ) );
dom.save( stream, 4, QDomNode::EncodingFromTextStream );

QgsDebugMsg( "GML UTF-8 (first 2000 bytes):\n" + gmlByteArray.left( 2000 ) );

QGis::WkbType wkbType;
QgsGmlSchema gmlSchema;

Expand Down

0 comments on commit 8b48638

Please sign in to comment.