Method: Escape for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Escape for VBS
Method: Escape for VBS
Encodes a text so that it only contains ASCII characters. All blanks, special characters, umlauts, and other characters that are not ASCII characters are encoded by the Escape method as %xx, whereby xx corresponds to the hexadecimal notation of the character. Unicode characters are encoded by the Escape method as %uxxxx.
vEscape = Object.Escape(string)
| Object | VBS Object with this method. You do not need to specify this object. |
| string | Variant Specifies any expression. |
| vEscape | Variant Receives the encoded text. |
The following example encodes a text:
'Returns "Spaces%2C%20umlauts%20like%20%E4%20and%20unicode%20characters%20like%20%u65E5" Call MsgBox(Escape("Spaces, umlauts like ä and unicode characters like ?"))