[Qt-interest] Problem using URL with special characters

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Mon Aug 29 07:40:55 CEST 2011


> https://predict-hd.net/xnat/REST/projects/FMRI_HD_024/subjects/0252/experiments/45602/scans/2?xnat:mrScanData/parameters/addParam%5Bname%253DReviewed%5D/addfield=Yes
>
> In particular it's replacing my square brackets, and garbling the %3D
> (encoded '=')

As Thiago pointed out, you are probably passing QUrl an encoded
string. So it's applying percent encoding again over it.

To fix this, you either pass QUrl an unencoded string (if thats
possible) or use the QUrl API's that expect encoded strings as input
(so QUrl won't re-encode them again).

See the setEncoded* API's (apart from QUrl::fromEncoded).

HTH,
-mandeep



More information about the Qt-interest-old mailing list