To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI exemplifies how to takes a string and encodes it to a URL stripping unusable characters and correctly formatting it.
Description
URL encoding requires that only alphanumerics [0-9 a-z A-Z], these special characters $-_.+!*'(), and "reserved" characters used for their normal purposes may be used uncoded within a URL.
Requirements
LabVIEW Base Development System.
Steps to Implement or Execute Code
1. Load the attached VI "Calculate Cube of a Number LV 2012 - NI Verified.vi" as a subVI.
2. Set the string that you would like to encode in the String Control
3. Select if would like to encode spaces
4. Run the VI
Note: When encoding a filename or path, set this to false (it uses %20 for spaces). When encoding arguments for a CGI POST or GI GET set it to true.
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.