Results 1 to 4 of 4

Thread: strange output using topercentencoding()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2011
    Location
    Hyderabad, India
    Posts
    25
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    7

    Default strange output using topercentencoding()

    pls check th below code n its strange output...i m not able to figure it out

    QString params = QString("q=%1&fields=%2")
    .arg(QByteArray("mimeType='application/json'").toPercentEncoding().data())
    .arg(QByteArray("items").toPercentEncoding().data( ));

    Output:
    q=mimeType%3D%27applicationitemsFjson%27&fields=it ems

    why items coming just after application...wat happened to '/' percent encoded part. If i remove '/' then output is fine.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,375
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: strange output using topercentencoding()

    And what is so strange here? "/" expands to %2F and thus "%2" gets expanded to the second argument given.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 1
    Last Post: 20th July 2012, 12:46
  2. Replies: 3
    Last Post: 27th August 2011, 22:44
  3. Replies: 8
    Last Post: 27th September 2010, 15:10
  4. Strange output: Can't compile for WinCE to save my life!
    By codeslicer in forum Qt Programming
    Replies: 3
    Last Post: 20th February 2010, 15:55
  5. output UTF?
    By mikro in forum Newbie
    Replies: 4
    Last Post: 19th May 2006, 00:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.