GridSite Grid Security for the Web
Web platforms for Grids

Welcome page : Documentation : Download : License


urlencode - convert strings to or from URL-encoded form


urlencode [-m|-d] string [string ...]


urlencode encodes strings according to RFC 1738.

That is, characters A-Z a-z 0-9 . _ and - are passed through unmodified, but all other characters are represented as %HH, where HH is their two-digit upper-case hexadecimal ASCII representation. For example, the URL becomes

urlencode converts each character in all the strings given on the command line. If multiple strings are given, they are concatenated with separating spaces before conversion.



Instead of full conversion, do GridSite "mild URL encoding" in which A-Z a-z 0-9 . = - _ @ and / are passed through unmodified. This results in slightly more human-readable strings but the application must be prepared to create or simulate the directories implied by any slashes.


Do URL-decoding rather than encoding, according to RFC 1738. %HH and %hh strings are converted and other characters are passed through unmodified, with the exception that + is converted to space.


0 is always returned.


Andrew McNab <[email protected]>

urlencode is part of GridSite:

This HTML page was made with roffit.

Last modified Tue  4 August 2009 . View page history
Switch to HTTPS . Print View . Built with GridSite 1.4.3
Funded by:   GridPP   STFC   JISC   University of Manchester