| miken32 2006-03-30, 6:57 pm |
| I've got a table in MySql (table, database, server, and connection all
using iso-8859-1) with some accented characters. When I try to display
these in a web browser, they come out incorrectly. But running PHP
from the command line I have no such problems. I also see the accents
correctly from the MySql client.
There is no HTML issue, because I've reverted to text/plain for the
purposes of troubleshooting. I'm not sure how this will come out for
those of you using text-only newsreaders, but this is what I'm seeing:
Command Line:
ALL=C9E All=E9e
=CELE =CEle
=C9CH =C9changeur
Browser:
ALL=90E All,e
=D7LE =D7le
=90CH =90changeur
This is the code, nothing more than a straight database dump:
<?php
$link=3Dnew mysqli(....);
$result=3D$link->query ('select * from street_types');
header('Content-Type:text/plain');
while ($row=3D$result->fetch_row()){
echo "$row[0] $row[1]\n";
}
?>
Has anyone seen this before? Any ideas how to fix it? Thanks!
|