RE: [PHP] detecting 2-bit characters.
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Wed, 15 Nov 2000 04:30:28 +0000 |
| Subject: | RE: [PHP] detecting 2-bit characters. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-25353@lists.php.net to get a copy of this message | ||
ahem,
I probably meant
$newstring = utf8_decode ($string); //Will strip out non ascii characters
to ?
if ($newstring == $string) {
//IS iso us-ascii
print "we're in the money...";
}
else {
//isnt iso us-ascii
print "<font color=red>Danger, Will Robinson, Danger</font>";
}
A quick re-read of the manual seems to indicate that this will work.
Cheers,
Lawrence.