escape Method (Windows Scripting - JScript)

 

Encodes String objects so they can be read on all computers.

Syntax

escape(charString) 

Remarks

The required charString argument is any String object or literal to be encoded.

The escape method returns a string value (in Unicode format) that contains the contents of charstring. All spaces, punctuation, accented characters, and any other non-ASCII characters are replaced with **%**xx encoding, where xx is equivalent to the hexadecimal number representing the character. For example, a space is returned as "%20."

Characters with a value greater than 255 are stored using the %uxxxx format.

Note

The escape method should not be used to encode Uniform Resource Identifiers (URI). Use encodeURI and encodeURIComponent methods instead.

Applies To: Global Object (Windows Scripting - JScript)

Requirements

Version 1

See Also

encodeURI Method (Windows Scripting - JScript)
encodeURIComponent Method (Windows Scripting - JScript)
String Object (Windows Scripting - JScript)
unescape Method (Windows Scripting - JScript)