[thelist] php and unicode

kris burford kris at midtempo.net
Thu Sep 12 05:19:01 CDT 2002


>i found a nice javascript function that encodes email addresses at
>http://www.gazingus.org/js/?id=106 (i most likely picked it up off this
>list at some point).
>
>anyway, id like to put this to use on my site, but cant figure out how
>to make php translate ascii characters into strings like
>"\u006d\u0061\u0069\u006c\u0074\u006f\u003a"
>
>does anyone know of a function that does this, or of an easy way to
>encode characters?
>
>thanks in advance,
>
>nick
>
>ps- this is my first post to the listm after 4 months of being
>subscribed!

hi nick,

i believe that the chr() function converts one ascii code to a character
and the org() function does the reverse. have a look at
http://www.php.net/manual/en/function.chr.php and
http://www.php.net/manual/en/function.ord.php

alternatively check out http://www.hivelogic.com/safeaddress/ as an
alternative (ooh, poor english...) means of encoding email addresses.

regards

kris



More information about the thelist mailing list