[Qt-interest] Questions about QUrl::toPercentEncoding() , howto escape all strings ?

Aaron Lewis aaron.lewis1989 at gmail.com
Mon Mar 22 07:48:26 CET 2010


Hi,
    I noticed that QUrl::toPercentEncoding() has a overloaded function , 
there parameters.
    One of them is used to decide the characters that should be escaped 
, so my question is , how do i gather all the strings ?

    I think there must be some good ways ;-)

    Sample Code:
   
    QByteArray excludeStr(QString("").toLatin1());
    QByteArray includeStr(QString("abcde").toLatin1());
    // I should not work like this , it's bad , i'd like to escape all 
characters , all printable ones
    // Unicode has totally no problems

    
ui->escapeLine->setText(QUrl::toPercentEncoding(ui->lineEdit->text(),excludeStr,includeStr));

    Any help will appreciate.

-- 
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode




More information about the Qt-interest-old mailing list