rcf | chars | description | encoding |
URL rfc1738 |
80-FF hex (not used in US-ASCII)
00-1F , 7F hex (control characters)
(napr. ìšèøžýáíéÌŠÈØŽÝÁÍÉúÚùÙ) | No corresponding graphic US-ASCII | Yes |
<>"#%{}|\^~[]` | Unsaved (+space) | Yes | |
;/?:@=& | Reserved | Yes | |
$-_.+!*'(), | Reserved special | May be | |
URI rfc3986 |
ALPHA DIGIT -._~ | Unreserved (%41-%5A, %30-%39, %2D%2E%5F%7E | Should not be |
!$&'()*+,;= | Reserved sub-delims | Yes | |
:/?#[]@ | Reserved gen-delims | Yes | |
other | other | Yes |
lng | function encode | function decode | ver | not encoded | spec |
JS | escape | unescape | 1.0+ | -_./@+* | |
JS | encodeURI | decodeURI | 1.5+ | -_.#~;/?:@=&$+!*'(), | |
JS | encodeURIComponent | decodeURIComponent | 1.5+ | -_.~!*'() | |
PHP | urlencode | PHP urldecode | 4+ | -_. | %20 as + |
PHP | rawurlencode | PHP rawurldecode | 4+ | -_.+ | |
Java | java.net.URLEncode.encode | ? | ? | ? | ? |
ASP | Server.URLEncode | ? | ? | ? | ? |
ASP.NET | Server.URLEncode | ? | ? | ? | ? |
ASP.NET | HttpUtility.URLEncode UtF8 / UtF7 / Ascii / Unicode | ? | ? | ? | ? |
.NET | HttpUtility.UrlEncode.encode | HttpUtility.URLEncode.decode | ? | ? | ? |
Flash MX | escape | unescape | ? | ? | ? |
Perl | uri_escape | uri_unescape | ? | ? | ? |
CGI | escape | unescape | ? | ? | ? |
CGI | escapeHTML | unescapeHTML | ? | ? | ? |
VBScript | escape | unescape | ? | ? | ? |
Python | urllib.quote | urllib.unquote | ? | ? | ? |
Python | urllib.urlencode | ? | ? | ? | ? |
Python/Zope | python:url_quote | ? | ? | ? | ? |
Ruby/CGI | CGI.escape | CGI.unescape | ? | ? | ? |
<script>
var str = "-_. <>\"#%{}|\\^~[]`;\/?:@=&$+!*'(),";
document.write(str);
document.write("<br>".escape(str));
document.write("<br>".encodeURI(str));
document.write("<br>".encodeURIComponent(str));
</script>
<?php
$str = "-_. <>\"#%{}|\\^~[]`;\/?:@=&$+!*'(),";
echo $str;
echo "<br>".urlencode($str);
echo "<br>".rawurlencode($str);
?>
-_. <>\"#%{}|\\^~[]`;\/?:@=&$+!*'(),
-_.+%3C%3E%22%23%25%7B%7D%7C%5C%5E%7E%5B%5D%60%3B%5C%2F%3F%3A%40%3D%26%24%2B%21%2A%27%28%29%2C
-_.%20%3C%3E%22%23%25%7B%7D%7C%5C%5E%7E%5B%5D%60%3B%5C%2F%3F%3A%40%3D%26%24%2B%21%2A%27%28%29%2C
http://xkr.us/articles/javascript/encode-compare/ example http://php.net PHP Book http://www.faqs.org/rfcs/rfc1738 rfc1738 http://docs.python.org Python Book