Re: HTML equivalents of accented characters
| From: | Ivo Fokkema | Date: | Wed, 13 Aug 2003 12:47:48 +0000 |
| Subject: | Re: HTML equivalents of accented characters | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159423@lists.php.net to get a copy of this message | ||
"Liam Gibbs" <liamgibbs@sympatico.ca> wrote in message
news:002b01c36194$dec89fd0$4d59fea9@TeletranOne...
> > I bet they do, did you check the HTML source as well? My guess is that
the
> > source is reading the actual expected output, but your browser views
"é",
> as
> > it should of course.
> Sorry, should have mentioned. The source code reads the actual character,
> not the é.
Hmmm... interesting... I tested your exact code in this format :
<?php
$result[] = "é";
$result[1] = htmlspecialchars($result[0]);
$result[2] = htmlentities($result[0]);
foreach ($result as $val) {
print ("[" . $val . "]");
}
?>
which returned (sourcecode)
[é][é][é]
So with me, htmlentities works. Did you try this :
$a = get_html_translation_table(HTML_ENTITIES);
var_dump($a);
? With me, it returns a 99 elements array with loads of characters,
including the "é". (PHP/4.2.3 on Win2000)
I have no idea what might be the problem, what does your translation table
look like?
--
Ivo Fokkema