Ticket #9188: myth-0.24-fixes-UPnP-UTF8-fix.patch

File myth-0.24-fixes-UPnP-UTF8-fix.patch, 3.9 KB (added by David Kubicek <foceni@…>, 13 years ago)

Patch for the latest stable release-0-24-fixes, r27355

  • mythtv/libs/libmythupnp/upnpcdsobjects.cpp

     
    128128    Properties::const_iterator it = m_properties.find(sName);
    129129
    130130    if (it !=  m_properties.end() && *it)
    131         return QUrl::fromPercentEncoding((*it)->m_sValue.toLatin1());
     131        return QUrl::fromPercentEncoding((*it)->m_sValue.toUtf8());
    132132   
    133133    return "";
    134134}
  • mythtv/libs/libmythupnp/httprequest.cpp

     
    844844
    845845            if ((sName.length() != 0) && (sValue.length() !=0))
    846846            {
    847                 sName  = QUrl::fromPercentEncoding(sName.toLatin1());
    848                 sValue = QUrl::fromPercentEncoding(sValue.toLatin1());
     847                sName  = QUrl::fromPercentEncoding(sName.toUtf8());
     848                sValue = QUrl::fromPercentEncoding(sValue.toUtf8());
    849849
    850850                mapParams.insert( sName.trimmed(), sValue );
    851851                nCount++;
     
    10851085        if (nCount > 1)
    10861086        {
    10871087            //m_sBaseUrl = tokens[1].section( '?', 0, 0).trimmed();
    1088             m_sBaseUrl = (QUrl::fromPercentEncoding(tokens[1].toLatin1())).section( '?', 0, 0).trimmed();
     1088            m_sBaseUrl = (QUrl::fromPercentEncoding(tokens[1].toUtf8())).section( '?', 0, 0).trimmed();
    10891089
    10901090            // Process any Query String Parameters
    10911091
    10921092            //QString sQueryStr = tokens[1].section( '?', 1, 1   );
    1093             QString sQueryStr = (QUrl::fromPercentEncoding(tokens[1].toLatin1())).section( '?', 1, 1 );
     1093            QString sQueryStr = (QUrl::fromPercentEncoding(tokens[1].toUtf8())).section( '?', 1, 1 );
    10941094
    10951095            if (sQueryStr.length() > 0)
    10961096                GetParameters( sQueryStr, m_mapParams );
     
    12991299                    if (!oText.isNull())
    13001300                        sValue = oText.nodeValue();
    13011301
    1302                     sName  = QUrl::fromPercentEncoding(sName.toLatin1());
    1303                     sValue = QUrl::fromPercentEncoding(sValue.toLatin1());
     1302                    sName  = QUrl::fromPercentEncoding(sName.toUtf8());
     1303                    sValue = QUrl::fromPercentEncoding(sValue.toUtf8());
    13041304
    13051305                    m_mapParams.insert( sName.trimmed(), sValue );
    13061306                }
  • mythtv/libs/libmythupnp/soapclient.cpp

     
    139139        if (!oText.isNull())
    140140            sValue = oText.nodeValue();
    141141
    142         return QUrl::fromPercentEncoding(sValue.toLatin1());
     142        return QUrl::fromPercentEncoding(sValue.toUtf8());
    143143    }
    144144
    145145    return sDefault;
     
    261261                    if (!oText.isNull())
    262262                        sValue = oText.nodeValue();
    263263
    264                     list.insert(QUrl::fromPercentEncoding(sName.toLatin1()),
    265                                 QUrl::fromPercentEncoding(sValue.toLatin1()));
     264                    list.insert(QUrl::fromPercentEncoding(sName.toUtf8()),
     265                                QUrl::fromPercentEncoding(sValue.toUtf8()));
    266266                }
    267267            }
    268268        }
  • mythtv/libs/libmythupnp/upnpcds.cpp

     
    994994    // ----------------------------------------------------------------------
    995995   
    996996    QString sKey = idPath.last().section( '=', 1, 1 );
    997     sKey = QUrl::fromPercentEncoding(sKey.toLatin1());
     997    sKey = QUrl::fromPercentEncoding(sKey.toUtf8());
    998998
    999999    if (sKey.length() > 0)
    10001000    {