> It's probable that it's a PHP...erm..."fact of life" right now. I ran
> into similar problems with iso-8859-7 and -9, using both
> htmlspecialchars and htmlentities with the (optional) 3rd parameter.
> Things worked unpredictably. In the PHP build I have now (4.4ish, from
> recent CVS), htmlspecialchars actually prints out a PHP error message
> (E_WARNING, I believe) that:
>
> "ISO-8859-7 is not supported by htmlspecialchars(); assuming ISO-8859-1"
>
> So I wouldn't be surprised if you weren't running into this problem,
> which wasn't officially recognized until after 4.2 was released. Look
> at bugs.php.net for related bugs...it's the only good way to keep up on
> the issue, which seems to be evolving...
>
> Cheers,
> spud.
Ok, so it's a known "missing feature".
Meanwhile, it's possible to replace:
$s = htmlspecialchars($s, ENT_COMPAT, 'UTF-8');
with:
mb_regex_encoding('UTF-8');
$s = mb_ereg_replace('&', '&', $s);
$s = mb_ereg_replace('>', '>', $s);
$s = mb_ereg_replace('<', '<', $s);
$s = mb_ereg_replace('"', '"', $s);
...which should decrease performance considerably, but I see no other
workaround.
Thanks,
--
Renato
--
This message has been scanned for viruses and
dangerous content and is believed to be clean.
--
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php