Copyright (C) 2000-2012 |
Manpages URI::EscapeSection: User Contributed Perl Documentation (3)Updated: 2001-10-26 Index Return to Main Contents NAMEURI::Escape - Escape and unescape unsafe charactersSYNOPSISuse URI::Escape; $safe = uri_escape("10% is enough\n"); $verysafe = uri_escape("foo", "\0-\377"); $str = uri_unescape($safe); DESCRIPTIONThis module provides functions to escape and unescape URI strings as defined by RFC 2396 (and updated by RFC 2732). URIs consist of a restricted set of characters, denoted as "uric" in RFC 2396. The restricted set of characters consists of digits, letters, and a few graphic symbols chosen from those common to most of the character encodings and input facilities available to Internet users:
"A" .. "Z", "a" .. "z", "0" .. "9", ";", "/", "?", ":", "@", "&", "=", "+", "$", ",", "[", "]", # reserved "-", "_", ".", "!", "~", "*", "'", "(", ")"In addition any byte (octet) can be represented in a URI by an escape sequence; a triplet consisting of the character ``%'' followed by two hexadecimal digits. Bytes can also be represented directly by a character using the US-ASCII character for that octet (iff the character is part of "uric"). Some of the "uric" characters are reserved for use as delimiters or as part of certain URI components. These must be escaped if they are to be treated as ordinary data. Read RFC 2396 for further details. The functions provided (and exported by default) from this module are:
The module can also export the %escapes hash which contains the mapping from all 256 bytes to the corresponding escape code. Lookup in this hash is faster than evaluating "sprintf("%%%02X", ord($byte))" each time. SEE ALSOURICOPYRIGHTCopyright 1995-2001 Gisle Aas.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
IndexThis document was created by man2html, using the manual pages. Time: 04:54:51 GMT, April 19, 2024 |