I need help with utf-8 before i go bald and the rest of my hair turns
white!
Platform:
Mac OS X 10.2.6
Safari 1.0 (v85)
Internet Explorer:mac 5.2.3 (5815.1)
Apache 2.0.47
PHP 4.3.2 (Apache 2 module)
libiconv 1.8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dt d">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Unicod e Test</title>
</head>
<body><p>
<?php
$macRom = 'métallique arquée'; // typed in a bbedit for mac
echo iconv('MacRoman ', 'UTF-8', $macRom);
?>
</p></body></html>
When I run this script, I get, both in Safari and Explorer,
métallique arquée
and not
métallique arquée
But, that's why I'm going crazy, *if* I save this output as an html
file and load it in Safari, *it shows the proper accents*!
Now, can somebody please explain me why a page generated using PHP is
behaving differently from the very same output of that page? What am I
missing?
Thank you all.
white!
Platform:
Mac OS X 10.2.6
Safari 1.0 (v85)
Internet Explorer:mac 5.2.3 (5815.1)
Apache 2.0.47
PHP 4.3.2 (Apache 2 module)
libiconv 1.8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dt d">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Unicod e Test</title>
</head>
<body><p>
<?php
$macRom = 'métallique arquée'; // typed in a bbedit for mac
echo iconv('MacRoman ', 'UTF-8', $macRom);
?>
</p></body></html>
When I run this script, I get, both in Safari and Explorer,
métallique arquée
and not
métallique arquée
But, that's why I'm going crazy, *if* I save this output as an html
file and load it in Safari, *it shows the proper accents*!
Now, can somebody please explain me why a page generated using PHP is
behaving differently from the very same output of that page? What am I
missing?
Thank you all.
Comment