Ticket #9188: myth-0.23-fixes-UPnP-UTF8-fix.patch
| File myth-0.23-fixes-UPnP-UTF8-fix.patch, 3.9 KB (added by , 15 years ago) |
|---|
-
mythtv/libs/libmythupnp/upnpcdsobjects.cpp
115 115 Properties::const_iterator it = m_properties.find(sName); 116 116 117 117 if (it != m_properties.end() && *it) 118 return QUrl::fromPercentEncoding((*it)->m_sValue.to Latin1());118 return QUrl::fromPercentEncoding((*it)->m_sValue.toUtf8()); 119 119 120 120 return ""; 121 121 } -
mythtv/libs/libmythupnp/httprequest.cpp
828 828 829 829 if ((sName.length() != 0) && (sValue.length() !=0)) 830 830 { 831 sName = QUrl::fromPercentEncoding(sName.to Latin1());832 sValue = QUrl::fromPercentEncoding(sValue.to Latin1());831 sName = QUrl::fromPercentEncoding(sName.toUtf8()); 832 sValue = QUrl::fromPercentEncoding(sValue.toUtf8()); 833 833 834 834 mapParams.insert( sName.trimmed(), sValue ); 835 835 nCount++; … … 1069 1069 if (nCount > 1) 1070 1070 { 1071 1071 //m_sBaseUrl = tokens[1].section( '?', 0, 0).trimmed(); 1072 m_sBaseUrl = (QUrl::fromPercentEncoding(tokens[1].to Latin1())).section( '?', 0, 0).trimmed();1072 m_sBaseUrl = (QUrl::fromPercentEncoding(tokens[1].toUtf8())).section( '?', 0, 0).trimmed(); 1073 1073 1074 1074 // Process any Query String Parameters 1075 1075 1076 1076 //QString sQueryStr = tokens[1].section( '?', 1, 1 ); 1077 QString sQueryStr = (QUrl::fromPercentEncoding(tokens[1].to Latin1())).section( '?', 1, 1 );1077 QString sQueryStr = (QUrl::fromPercentEncoding(tokens[1].toUtf8())).section( '?', 1, 1 ); 1078 1078 1079 1079 if (sQueryStr.length() > 0) 1080 1080 GetParameters( sQueryStr, m_mapParams ); … … 1277 1277 if (!oText.isNull()) 1278 1278 sValue = oText.nodeValue(); 1279 1279 1280 sName = QUrl::fromPercentEncoding(sName.to Latin1());1281 sValue = QUrl::fromPercentEncoding(sValue.to Latin1());1280 sName = QUrl::fromPercentEncoding(sName.toUtf8()); 1281 sValue = QUrl::fromPercentEncoding(sValue.toUtf8()); 1282 1282 1283 1283 m_mapParams.insert( sName.trimmed(), sValue ); 1284 1284 } -
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
929 929 // ---------------------------------------------------------------------- 930 930 931 931 QString sKey = idPath.last().section( '=', 1, 1 ); 932 sKey = QUrl::fromPercentEncoding(sKey.to Latin1());932 sKey = QUrl::fromPercentEncoding(sKey.toUtf8()); 933 933 934 934 if (sKey.length() > 0) 935 935 {
