March 16, 2000 - ISO Latin-1 Conversion | WebReference

March 16, 2000 - ISO Latin-1 Conversion

Yehuda Shiran March 16, 2000
ISO Latin-1 Conversion
Tips: March 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

ISO Latin-1 character set is the Internet standard. It consists of only alphanumeric characters. All non-alphanumeric characters are replaced by a string in the form of %xy, xy being the ASCII encoding of a non-alphanumeric character. The escape() function converts any string to ISO Latin-1 standard. For example:

document.write(escape("My phone # is 123-456-7890"));

should yield the following encoding:


The function unescape() converts an ISO Latin-1 representation back to a normal string.

Learn how Internet Explorer does it in version 5.5 in Column 59, IE 5.5: Formatting, URIs, and Stack Operations.