Skip to content
Permalink
Browse files

Merge pull request #8580 from rldhont/server-wms-decode-sld-218

[BUGFIX][Server] WMS: Decode loaded SLD files from SLD parameter
  • Loading branch information
rldhont committed Dec 3, 2018
2 parents 1bb499e + bdd2aa9 commit 8b28b63c6798ade28c29ba07f2ef2cb0e5b3f5a6
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 8b28b63

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