Escape

Availability

Flash Lite 1.1.

Description

Encodes an arbitrary string into a format that is safe for network transfer. Replaces each nonalphanumeric character with a hexadecimal escape sequence (%xx, or %xx%xx in the case of multibyte characters).

Command

Parameters

Value returned

"Escape"

original  String to be encoded into a format safe for URLs.

encoded  Resulting encoded string.

These parameters are either names of variables or constant string values (for example, "Encoded_String").

0: Failure.

1: Success.

Example

The following example shows the conversion of a sample string to its encoded form:

original_string = "Hello, how are you?";
status = fscommand2("escape", original_string, "encoded_string");
trace (encoded_string);                                            // output: Hello%2C%20how%20are%20you%3F

See also

Unescape