Posted by Edward Z. Yang on 06/15/07 22:28
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
jerry@mynetserv.com wrote:
> I am trying to use php to remove all unicode from a string. What I am
> seeing it the white question mark with a black diamond. I have tried
> html_entity_decode and preg_replace but had no luck. Any help would be
> greatly appreciated. Thanks!
Try utf8_decode()
<http://us2.php.net/manual/en/function.utf8-decode.php> Note that this
function will replace your Unicode characters with question marks, and
will not convert valid ISO-8859-1 characters.
- --
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <htmlpurifier.org> Anti-XSS HTML Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGcxKOqTO+fYacSNoRAny9AJ4my5eKYF4wvVvWTiax7skAuY7PUACfVnJb
94TPMeMTzZUB+zFY8b5ANMc=
=q0TX
-----END PGP SIGNATURE-----
[Back to original message]
|