Name
Unescape function
Syntax
Unescape(string
)string
Use: Required
Data Subtype: String
An encoded string
Return Value
A string variant containing the decoded version of
string
.
Description
Decodes a URL-encoded or HTML-encoded string.
Rules at a Glance
Replaces all encoded characters with their corresponding characters.
Encoded values in the form of
%
xx
are replaced with
their corresponding ASCII characters, while values in the form
%u
xxxx
are replaced
with their corresponding Unicode characters.
Programming Notes
The Unescape function is not documented in the VBScript documentation.
The function corresponds to the JavaScript unescape method.
If
string
has no encoded characters, the function merely returnsstring
unchanged.All encoded characters in the form
%
xx
are replaced with their equivalent ASCII strings.All encoded characters in the form
%u
xxxx
are replaced with their equivalent Unicode character strings.
VB/VBA Differences
This function is not supported in VBA.
See Also
Get VBScript in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.