[Qt-interest] Request to URL including percent
KIMURA, Hidetaka
kimura at jig.jp
Thu Dec 18 06:21:44 CET 2008
Great!
I'll try 4.5 version.
Thanks ;-)
On Wed, 17 Dec 2008 17:52:57 +0100
Thiago Macieira <thiago.macieira at trolltech.com> wrote:
> On Wednesday 17 December 2008 10:26:10 KIMURA, Hidetaka wrote:
> > Thanks, but it makes a request to /a:b.
> > QUrl::fromPercentEncoding also did not make a request to /a%3Ab...
>
> %3A is a colon. QUrl in Qt 4.4 cannot hold a percent-encoded character if the
> RFC 3986 says it's not supposed to be encoded at that position.
>
> QUrl in Qt 4.5 is now capable of holding the URL exactly as you passed it.
>
> So,
>
> QUrl u = QUrl::fromEncoded("http://example.com/a%3Ab");
> qDebug() << u.encodedPath();
> qDebug() << u.path();
>
> will print:
> /a%3Ab
> /a:b
>
> and:
> qDebug() << u.toEncoded();
> qDebug() << u.toString();
>
> prints:
> http://example.com/a%3Ab
> http://example.com/a:b
> --
> Thiago Macieira - thiago.macieira (AT) nokia.com
> Senior Software Engineer - Nokia, Qt Software
> Qt Software is hiring - ask me
> Sandakerveien 116, NO-0402 Oslo, Norway
-------
木村秀敬 - kimura at jig.jp
株式会社 jig.jp
More information about the Qt-interest-old
mailing list