QUrl.encodedQuery () does not properly encode '+' symbol

I submit an HTTP POST, like this:

QNetworkRequest request(url);

QUrl params;
params.addQueryItem("myParam", myParamStr);

QByteArray byteArrayObject = params.encodedQuery();
QByteArray postDataSize = QByteArray::number(byteArrayObject.size());

request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
request.setHeader( QNetworkRequest::ContentLengthHeader, QString(postDataSize).toUtf8() );

However, when the myParamStr string contains a symbol '+', that it does not get encoded as '% 2B' according to the w3 reference http://www.w3schools.com/tags/ref_urlencode.asp. Is originally from the side (PHP) server not not to treat the '+' correctly and it essentially gets deleted and replaced by ' '.

Does anyone have an idea how to solve this problem? To work around the problem, I do a replace string Manual of '+' with '% 2B' but I don't know if it's something that could create problems on the road not a clean solution would be appreciated.

Hello! I think you should encode the individual parameters as well. One of my apps (should work in Qt 4.8 and waterfalls, Qt 5 these classes has changed):

QUrl params;

params.addEncodedQueryItem("email", QUrl::toPercentEncoding(email));
params.addEncodedQueryItem("last_name", QUrl::toPercentEncoding(lastName));

QByteArray data = params.encodedQuery();

QNetworkReply *reply = networkAccessManager_.post(request, data);

Tags: BlackBerry Developers

Similar Questions

  • Safari Web Clip does not properly

    Hello everyone

    I have a problem with safari Web Clip and that is does not properly for almost all pages, as example, I participate in a contest of therapy dbrand/unbox, and I really don't want to open the web page, whenever a new winner is announced, so I created a web clip, but it does not work well When I click the web clip icon he asked the location of the clip and when click on done, the web clip is from a different region and I can't fix.

    Is this some sort of bug or can I fix it myself?

    Web Clip still didn't work if the cut element remains in the exact same on exactly the same site. This is apparently not the case here.

    Dashboard widgets in general, are an old technology that has not been updated in many years.

  • Toshiba 47L7453DG - CEC does not properly using exernal amplifier

    I bought Toshiba 47L 7453 a few days ago.

    It is connected to the amplifier Onkyo TX-NR535 but CEC does not properly. Volume control works fine but On / Off or stanby does not at all.

    My previous TV Toshiba 42XV635DG was communicated by the CEC with the Onkyo even without any problem.

    The wire connection is HDMI 1.4 certified.
    Maybe the problem is with the firmware of the TV.

    Maybe someone had the same problem.

    Any suggestion?

    Thank you

    Hello

    From my point of few TV and amplifier are connected some CEC (Volume control) functions that work. I think you should check the auto power settings and HDMI CEC standby control system.

    Manual, you will find some important notes:
    http://www.Toshiba-OM.NET/LCD/PDF/English/L7453-424755-English.PDF

    _Page: 11_
    + You can control the basic functions of audio/video devices connected with s TV remote if you connect an HDMI-CEC compatible AV amplifier or playback device. +
    + If several devices are connected, the HDMI CEC control function may not work correctly. +

    _Page: 86 - 87_
    + When the point to activate the HDMI CEC control in the menu of HDMI CEC control configuration is defined on.
    + On, also allocated to individual features will be activated. +
    + When the connected equipment work, HDMI CEC control automatically detects the TV input selection. If the TV is in standby mode, it will be automatically reactivated. +
    + If the TV is off (standby), television will send a message turns off (standby) all devices HDMI CEC control connected to the TV. +

  • EQUIUM A60: graphic ATI does not properly

    I HAVE AN EQUIUM A60 1 YEAR MESSAGE SUDDENLY CRASH SAID: ATI GRAPHICS CARD DOES NOT PROPERLY.
    CAN'T FIND THE DRIVERS UPDATED ON ATI OR MICROSOFT HELP PLEASE?

    Hello

    Can you tell me when this message appears?
    First of all, you can try to update the graphics driver from Toshiba. It is a first step that you can try.
    Check this page for the driver download.
    http://EU.computers.Toshiba-Europe.com/cgi-bin/ToshibaCSG/download_drivers_bios.jsp

    Good bye

  • Error message: Shockwave, Flash Player does not properly during playback Slotomania

    Original title: shockwave flash player

    Hi I have problems with some games. Especially slotomania. When I enter the RM of slotomania that flashing message saying that Flash shockwave Player does not properly can give to interrupt or stop options taken but its gone too fast for me to do something. Then the really slow game. Can you help me?

    Hello Marilyn,.

    Thanks for posting your query in the Microsoft Community Forum.

    According the information, you are facing problems to play games online as Slotomania due to the Adobe Shockwave, Flash Player error messages.

    It would be useful that you can answer these questions to help you further.

    1. are you facing problems that when you play online game Slotomania?

    2. using Internet Explorer or another web browser?

    3. what version of the Windows operating system is installed on your computer?

    4. have you made a recent software or hardware changes to the system?

    If you use Internet Explorer, you can see the article and check if it helps to solve the problem.

    The problems of games online using Internet Explorer

    It will be useful.

    Let us know if you need help with Windows related issues. We will be happy to help you.

  • fan does not properly

    Does not properly on the laptop

    Sometimes it is just dust, animal hair etc. blocking the fan. Take a can of compressed air and blow all the ports/vents/opening very carefully to see if any change.

  • Setup.exe does not properly

    I'm trying to upgrade to Windows 7, and at one point in the configuration of several programs are listed to be uninstalled, when it gets to the Realtek USB 2.0 card reader a pop window that says setup.exe does not properly.  Cannot uninstall in Control Panel either. Also tried disabling antivirus and firewall as a suggested site. Is there a way around this kind of Setup Windows 7 allows you to work around this problem

    Repeat: You need upgrades to Windows 7 not Windows updates.
    http://social.answers.Microsoft.com/forums/en-us/w7install/threads

    Please post on the forum for Windows 7 update/install. TaurArian [MVP] 2005-2010 - Update Services

  • Graphic drive does not properly.

    Graphics driver does not properly.  Screen will Dim and must restart to resume use.  Occurring more frequently now.  Y at - it a fix for this problem?

    Problem does not occur in safe mode.  Failure seems to occur on any key or the video style.

    Any material support is the manufacturer of the hardware regardless of the operating system that you choose to use.  As it is unlikely that you have a Microsoft video/graphics card - one you have and have you downloaded and installed the latest drivers/software they provide for your particular device?

  • COQ2014: COQ2014 AMD/ATI does not properly

    2 messages warn me for "AMD/ATI does not properly" and "search solution AMD Display adapt-ATI Radeon Graphics Cards.  Search for updates, solutions with nothing appear.  I don't know what that precisely uninstall nor where the new material.

    Thank you!

    Dear customer,

    Welcome to the HP consumer's Support Forum!

    Please try and uninstall the graphics driver AMD/ATI to address current from the control panel > programs and features.

    After you have uninstalled the current graphics driver, please try and install the following driver and check:

    Suite software Catalyst:

    http://support.AMD.com/en-us/download/desktop?OS=Windows+7+-+32

    Hope this helps, for other queries in response to the post and feel free to join us again.

    * Click on the star of CONGRATULATIONS on the left to say thank you *.

    Make it easier for others to find solutions by checking a response "Accept as Solution" if it solves your problem.

    Thank you
    GR1
    Although I am an employee of HP, I speak for myself and not for HP

  • When I turn on my computer a warning appears indicating "delivery manager does not properly.

    DEP original title: data

    When I turn on my computer, a warning appears that says "delivery manager does not properly" and when I click on help and support balloon explanation is that my DEP is not configured correctly.

    Then, after following the instructions and correct the parameters I restart my pc and still the same message appears.

    Hi Olliewoods,

    (1) since when are you facing this problem?

    (2) what is you receive the exact error message?

    An application installed on the computer may be the cause of this problem; I suggest you try the following steps:

    Method 1: Put the computer to boot to determine which application is causing the problem.

    Follow step 1 in the link below,

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    If everything works well after a clean boot, you can deduce that some third-party services are at the origin of the problem.

    Continue with the remaining steps to pin-point on the third party service.

    After find you the program that is causing the problem, you will have to perhaps to update or install a newer version of the program, if you rarely use that you should consider uninstalling the software.

    Important: n ' forget not the computer to start normal follow step 7 in the link.

    See the link below for more information on Data Execution Prevention
    Data Execution Prevention: Frequently asked questions

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer
    ---------------------------------------------------------------------------------------------------------
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Scrolling the page does not properly respond to BlackBerry Curve9360

    Hello friend

    I have developed applications for BlackBerry (JqueryMobile, Phonegap) the application works fine in BlackBerry Torch 9800.

    But once I've installed in BlackBerry Curve9360, scrolling of the page does not properly, that I am not able to view the complete list of items and long text.

    Help, please

    I came up with the solution, the problem occurs because BlackBerry Curve 9360 isn't a touchscreen, there fore scroll doesn't work.

    In my applications, I add 2 pages "index.html."

    on the first page, you have to test if the device is not touch and redirect to the second page.

    Do not use the page for "BB Curve" scroll and any other animation like CSS "" - webkit - transform: translate3d "»

    The other js script go without a problem.

    The page "BB Curve" to redesign the html for use with the cursor,
    For example, the menu is smaller, the police is smaller.
    the size of the screen is fixed.
    Dimension height is better indicate a value min eg 300px
    etc...

  • Mini Bridge does not properly

    Mini Bridge does not properly; said the bridge should run but the bridge is running and mini Bridge never load

    Hi Margot,.

    Mini Bridge is created on a former technology based on Flash, which is currently not supported for future versions. Mini Bridge support will be removed in the Future of the Bridge and InDesign version.

    Thank you

    Deepak Gupta

  • Edit in Photoshop as greyed out.rebooted several times does not properly, can someone advise?

    Creative could use, recently not able to 'Edit in Photoshop' as grayed out. I uninstalled both and restarted several times now. Still does not properly, can anyone advise?

    Hi sandy,

    Please check the image you try to change, the Images should not miss the Lightroom library.

    Please try and complete the step with a different image.

    Kind regards

    ~ Mohit

  • does not properly

    no support for items 12 does not properly

    What is the question?

  • touch screen keyboard symbols does not properly

    I bought recently an Asus transformer convertible portable book, which features a touchscreen removable "tablet" next to the keyboard. Most of the time I just use the screen without the keyboard as I have the touchscreen keyboard. I have windows 8 is installed.

    The problem is that no matter when try to use the keyboard section and press a key, it acts as a regular keyboard that requires shift for me to press a button to get some symbols. Such as SHIFT, press 1 to get! and 2 to get @ etc.

    This is a problem because there no way for me to 'shift' then that in this section, which means I have no way to use the majority of the symbols, unless I was to give the keyboard, which I won't do. It's the same with the? on the main screen to give me a / instead.

    Someone else has this problem as well? Becomes more and more frustrating.

    I searched for answers, the closest, I had was that it could be the UK keyboard, which is not, as I discovered, I have the English (Canada), I selected when setting up my computer.

    The keyboard I used was the touch keyboard, similar to that on the picture of this Article:

    http://Windows.Microsoft.com/en-us/Windows-8/using-touch-keyboard

    I tried also a lot of different things that I could think of to try to make it work, such as the SHIFT key, and then selecting the specific symbol, neither of which worked, moving to the symbols section and pressing one and also hold out the number or symbol that coincides with it.

    Honestly I don't know what happened, but it seemed to have fixed itself after my computer up to date a little after I posted this. which is always strange, because it was updated several times before and the problem remains.

    IM praying that the problem does not return, but I'm not keeping my hopes.

Maybe you are looking for

  • Satellite L300 - unable to connect to my router

    Hi guys,. I got this laptop a few days ago, everything works as it is supposed to be except for one thing, I try to connect to my wireless internet signal and it picks up the signal itself as a strong signal, but when I go to enter my WEP it never co

  • SP4600 drivers & install Windows XP SP2

    Hello I intend to perform a new installation of Windows XP SP2 on my laptop SP4600. Unfortunately, I have not the CD of recovery or any Tools & Utilities CD with drivers for Windows XP. Instead, I downloaded a set of drivers for the Toshiba driver do

  • How can I stop the printer to print an information page after each print job

    Original title: print How can I stop the printer to print an information page after each print job

  • I bought the Windows Anytime Upgrade, but the software will not be installed.

    Help... I bought the Windows Anytime Upgrade on Microsoft Office software to my Vista laptop, but the software will not be installed. Operation message is not supported on this platform. How to get around the facility? I have the product key number,

  • HP Laserjet 1300: laserjet 1300

    I use this printer for years print letters. Just recently, I printed a picture and noticed a horizontal line that appear every 3 inches. I scanned the photo and blowing it up to see the line. I seem to have embedded in Japanese symbols. What is the p