[thelist] [php] ord() function

kris burford kris at midtempo.net
Mon Mar 15 05:14:49 CST 2004


i'm trying to use the ord() function in php to identify non-standard chars 
(i.e. those pasted in from a word doc) and then convert them either to html 
character-entities, or substitute them for appropriate equivalents.

however, it seems like anything between 128-158 is just being returned as 
63,  "?".

there's nothing special in the code, the relevant piece being:

for($i = 0; $i < strlen($text); $i++) {
$num = ord($text[$i]);
echo $num . " "; // check for me

any ideas?


kris burford
midtempo ltd

More information about the thelist mailing list