NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_urldecode(n) 5.0.0a naviserver "NaviServer Built-in Commands"

Name

ns_urldecode - URL decoding

Table Of Contents

Synopsis

Description

This command decodes a string according to the rules for URL encoding defined in RFC #1738, Uniform Resource Locators.

COMMANDS

ns_urldecode ?-charset charset? ?-fallbackcharset fallbackcharset? ?-part part? ?--? string

The option -charset can be used to specify the character set of the decode operation. In case the string cannot be decoded into the specified charset (on most platforms UTF-8) an exception is raised.

In cases, where no explicit -charset is specified, the option -fallbackcharset can be used to specify an alternative character set when the conversion of the querystring leads to invalid UTF-8. Instead of raising an exception, a second attempt of decoding the query string is made with the fallback charset. In contrary to ns_getform and ns_parsequery the configuration parameter is not used formfallbackcharset, since this happens outside automatic form processing.

The option -part is used to specify the query (default) or path encoding.

See Also

ns_charsets, ns_getform, ns_parsequery, ns_urlcharset, ns_urlencode, nsd

Keywords

URL, charset, encoding, formfallbackcharset, global built-in