O'Reilly logo

VBScript in a Nutshell, 2nd Edition by Ron Petrusha, Matt Childs, Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Unescape function

Syntax

Unescape(string)
string

Use: Required

Data Type: 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 JScript Unescape method.

  • If string has no encoded characters, the function merely returns string 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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required