Skip to content
Permalink
Browse files
WMS identify GML: clear bytearrya before encoding to utf8, fixes "inv…
…alid token"
  • Loading branch information
blazek committed Feb 14, 2014
1 parent 54da1cf commit 8b48638786c65fca87682a8eafbe15c616ab5d63
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/providers/wms/qgswmsprovider.cpp
@@ -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;

0 comments on commit 8b48638

Please sign in to comment.