Highlighted
Absent Member.
Absent Member.
950 views

Possible issue with web_convert_param function?

Hi guys,

I'm using the web_convert_param function to convert an HTML value into a URL value as it's needed in a subsequent web_custom_request.

The value is being captured as  Northern Ireland REGION and when I convert it to URL it becomes Northern+Ireland+REGION
If I then use the web_convert_param function again, the value becomes Northern%2BIreland%2BREGION.

So either I'm converting the value incorrectly (I've tried HTML and Plain as the SourceEncoding) or there's a problem with the function -  I would expect the spaces in the original value to become %20, not %B. I also wouldn't expect to see the '+' symbol used to replace a space when converting to URL!

Can someone check this for me or correct me if I'm doing it wrong? I would expect the value to become Northern%20Ireland%20REGION.

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Possible issue with web_convert_param function?

Hi 

Both are correct and th one used depends on the case where it is used and the implementetion.

Read about what Wikipedia have to say https://en.wikipedia.org/wiki/Percent-encoding about ""application/x-www-form-urlencoded. There are a lot wirtten about this, just google

Using  convert_param twice will for sure give you a different string, and to get the original back the reciever will have to convert back twice also, which it have no idea that it should.

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

 

.
Highlighted
Absent Member.
Absent Member.

Re: Possible issue with web_convert_param function?

Ah ok, thanks.

In the end I parameterised all of the values I needed in the format required, string manipulation would've taken too long!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.