[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Integer --> ASCII Character equivalent??



Alex Reif <ajreif@undergrad.math.uwaterloo.ca> wrote:

>Does anyone know if JavaScript can take an integer and return the ASCII 
>character that it represents?

If you have a hex integer you could do the following:

    character = eval('"\\' + 'x' + hex_integer + '"');

I implemented an un-cgi encoding function the hard way like this, before
I found out about the 'unescape' function by looking at someone's code.

Where are functions like 'escape' and 'unescape' documented? They're
not mentioned in the JavaScript document at Netscape.

-Rolf

--
mailto:rolf@insect.demon.co.uk      http://www.parallax.co.uk/~rolf/