Ticket #9188: myth-0.24-fixes-UPnP-UTF8-fix.patch
File myth-0.24-fixes-UPnP-UTF8-fix.patch, 3.9 KB (added by , 13 years ago) |
---|
-
mythtv/libs/libmythupnp/upnpcdsobjects.cpp
128 128 Properties::const_iterator it = m_properties.find(sName); 129 129 130 130 if (it != m_properties.end() && *it) 131 return QUrl::fromPercentEncoding((*it)->m_sValue.to Latin1());131 return QUrl::fromPercentEncoding((*it)->m_sValue.toUtf8()); 132 132 133 133 return ""; 134 134 } -
mythtv/libs/libmythupnp/httprequest.cpp
844 844 845 845 if ((sName.length() != 0) && (sValue.length() !=0)) 846 846 { 847 sName = QUrl::fromPercentEncoding(sName.to Latin1());848 sValue = QUrl::fromPercentEncoding(sValue.to Latin1());847 sName = QUrl::fromPercentEncoding(sName.toUtf8()); 848 sValue = QUrl::fromPercentEncoding(sValue.toUtf8()); 849 849 850 850 mapParams.insert( sName.trimmed(), sValue ); 851 851 nCount++; … … 1085 1085 if (nCount > 1) 1086 1086 { 1087 1087 //m_sBaseUrl = tokens[1].section( '?', 0, 0).trimmed(); 1088 m_sBaseUrl = (QUrl::fromPercentEncoding(tokens[1].to Latin1())).section( '?', 0, 0).trimmed();1088 m_sBaseUrl = (QUrl::fromPercentEncoding(tokens[1].toUtf8())).section( '?', 0, 0).trimmed(); 1089 1089 1090 1090 // Process any Query String Parameters 1091 1091 1092 1092 //QString sQueryStr = tokens[1].section( '?', 1, 1 ); 1093 QString sQueryStr = (QUrl::fromPercentEncoding(tokens[1].to Latin1())).section( '?', 1, 1 );1093 QString sQueryStr = (QUrl::fromPercentEncoding(tokens[1].toUtf8())).section( '?', 1, 1 ); 1094 1094 1095 1095 if (sQueryStr.length() > 0) 1096 1096 GetParameters( sQueryStr, m_mapParams ); … … 1299 1299 if (!oText.isNull()) 1300 1300 sValue = oText.nodeValue(); 1301 1301 1302 sName = QUrl::fromPercentEncoding(sName.to Latin1());1303 sValue = QUrl::fromPercentEncoding(sValue.to Latin1());1302 sName = QUrl::fromPercentEncoding(sName.toUtf8()); 1303 sValue = QUrl::fromPercentEncoding(sValue.toUtf8()); 1304 1304 1305 1305 m_mapParams.insert( sName.trimmed(), sValue ); 1306 1306 } -
mythtv/libs/libmythupnp/soapclient.cpp
139 139 if (!oText.isNull()) 140 140 sValue = oText.nodeValue(); 141 141 142 return QUrl::fromPercentEncoding(sValue.to Latin1());142 return QUrl::fromPercentEncoding(sValue.toUtf8()); 143 143 } 144 144 145 145 return sDefault; … … 261 261 if (!oText.isNull()) 262 262 sValue = oText.nodeValue(); 263 263 264 list.insert(QUrl::fromPercentEncoding(sName.to Latin1()),265 QUrl::fromPercentEncoding(sValue.to Latin1()));264 list.insert(QUrl::fromPercentEncoding(sName.toUtf8()), 265 QUrl::fromPercentEncoding(sValue.toUtf8())); 266 266 } 267 267 } 268 268 } -
mythtv/libs/libmythupnp/upnpcds.cpp
994 994 // ---------------------------------------------------------------------- 995 995 996 996 QString sKey = idPath.last().section( '=', 1, 1 ); 997 sKey = QUrl::fromPercentEncoding(sKey.to Latin1());997 sKey = QUrl::fromPercentEncoding(sKey.toUtf8()); 998 998 999 999 if (sKey.length() > 0) 1000 1000 {