LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

URL Percent String To ASCII

Solved!
Go to solution

Okay I didn't know how to word this, and maybe that's because I don't know enough about what is going on.  If I enter a URL like "http://Mywebsite.com/Sub Folder/index.html" the space in there between the word Sub and Folder is replaced with a %20.  Likewise if I enter an open parenthesis it is %28, the "&" symbol is %26.

 

Now I don't know all of the special characters and their conversions, but is there a VI someone has, or one in vi.lib that can convert from these URL percent characters to ASCII text?

0 Kudos
Message 1 of 5
(4,789 Views)
Solution
Accepted by Hooovahh

Hi Hooovahh,

 

looks like a simple percent sign followed by the hex number of the ASCII char in question…

 

I guess you already did read the Wikipedia entry on this topic?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(4,786 Views)
0 Kudos
Message 3 of 5
(4,783 Views)

psst, is this what you want?

https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/wsapi/vis/escape-http-url-vi.html

it and its sibling are under the web service palette

Message 4 of 5
(4,750 Views)

Since the goal is to convert from a URL to an ASCII string, I think the complement to this function is what he wants:

 

https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/wsapi/vis/unescape-http-url-vi.html

 

Unescape HTTP URL VI

0 Kudos
Message 5 of 5
(4,692 Views)