Skip to content
Permalink
Browse files

[BUGFIX][Server] WMS: Decode loaded SLD files from SLD parameter

  • Loading branch information
rldhont committed Dec 3, 2018
1 parent 1bb499e commit bdd2aa9c0886f6c6187527e0e98c1af40cfa49fb
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/server/qgshttprequesthandler.cpp
@@ -27,6 +27,7 @@
#include "qgsmapserviceexception.h"
#include <QBuffer>
#include <QByteArray>
#include <QTextCodec>
#include <QDomDocument>
#include <QFile>
#include <QImage>
@@ -602,7 +603,12 @@ void QgsHttpRequestHandler::requestStringToParameterMap( const QString& request,
{
continue; //only http and ftp supported at the moment
}
value = QString( fileContents );
QTextCodec* codec = QTextCodec::codecForUtfText( fileContents, nullptr );
if ( !codec )
{
codec = QTextCodec::codecForName( "UTF-8" );
}
value = codec->toUnicode( fileContents );
#else
QgsMessageLog::logMessage( "http and ftp methods not supported with Qt5." );
continue;

0 comments on commit bdd2aa9

Please sign in to comment.
You can’t perform that action at this time.