URL_ENCODE changes spaces to + instead of %20

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
BLOMASKY
Posts: 1473
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

URL_ENCODE changes spaces to + instead of %20

Post by BLOMASKY »

I am calling a rest service and have to send an HTML string. If I dont URL_ENCODE(the string) Aware throws an error when running the service. If I DO URL_ENCODE then all of the spaces turn into + and when my JAVASCRIPT rest server runs a decodeURI it leaves the + alone. Is this a problem with the way Aware Encodes or the way Javascript decodes?

Thanks
Bruce
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: URL_ENCODE changes spaces to + instead of %20

Post by aware_support »

There is some confusion there as to how spaces should be encoded.

According to application/x-www-form-urlencoded spaces should be encoded ass +

You can probably use the REPLACE_STRING function to convert + to %20
Aware IM Support Team
Post Reply