User Guide

URLEncodedFormat 899
URLEncodedFormat
Description
Generates a URL-encoded string. For example, it replaces spaces with %20, and non-
alphanumeric characters with equivalent hexadecimal escape sequences. Passes arbitrary strings
within a URL (ColdFusion automatically decodes URL parameters that are passed to a page).
Returns
A copy of a string, URL-encoded.
Category
Conversion functions, Other functions, String functions
Function syntax
URLEncodedFormat(string [, charset ])
See also
URLDecode
; “Tags and functions for globalizingin Chapter 17, “Developing Globalized
Applications, in ColdFusion MX Developers Guide
History
ColdFusion MX 6.1: Changed the default encoding to be the response character encoding.
ColdFusion MX: Added the
charset parameter.
Parameters
Parameter Description
string A string or a variable that contains one
charset The character encoding in which the string is encoded. Optional.
The following list includes commonly used values:
utf-8
iso-8859-1
windows-1252
us-ascii
shift_jis
iso-2022-jp
euc-jp
euc-kr
big5
euc-cn
utf-16
For more information on character encoding, see:
www.w3.org/International/O-charset.html.
The default value is the character encoding of the response. See
cfcontent.