Php's urldecode in QT?
-
wrote on 16 Feb 2012, 11:30 last edited by
Hi there,
is there an easy way to decode url encoded strings, ecactly as php's function urldecode() is working, so for example
@"hello% 20world% 20i% 20am% 20url% 20encoded"@
(ofcourse no blank after the %, the forum did not allow to input it as percent20)
gets
@"hello world i am url encoded"@
I have seen that QUrl have similar functions, but its not a url, its a plain string without hostname and stuff.
Thank you in advance.
-
wrote on 16 Feb 2012, 11:53 last edited by
Yes, check class reference of "QUrl":http://developer.qt.nokia.com/doc/qt-4.8/qurl.html. You can use "QUrl::fromPercentEncoding":http://developer.qt.nokia.com/doc/qt-4.8/qurl.html#fromPercentEncoding to decode the URL.
1/2