How To Encode URI Data In Popular Languages
URL Encoding also known as Percent-encoding is the way to encode data passed in an URI (Uniform Resource Identifier), this system is used to convert special characters to hex form prefixed with a % sign, and prevents broken URLs. An encoded URL will look like the following:
In this article we'll see how URL encoding can be done in different languages:
PHP comes with a built-in function urlencode which Percent-encodes the string passed to it.
In Perl there are multiple modules available which can do the work for you, or you can write such a subroutine yourself, let's take a look at booth examples below:
In Python the urllib module is used:
The built-in functions encodeURIComponent(str) and encodeURI(str)
ASP.Net also has a built-in function to encode URL components with special characters.
Re: How To Encode URI Data In Popular Languages
great reference. I was looking for URL encode in ASP
|All times are GMT +5.5. The time now is 05:34.|