[sclug] Character encoding

Peter Brewer p.w.brewer at reading.ac.uk
Thu Dec 7 14:05:18 UTC 2006


Sorry guys,

After struggling with this all morning... I stumbled across the answer 
five minutes after emailing you.  Typical!

Thanks anyway!

Peter



Peter Brewer wrote:
> Dear All,
>
> I'm having some issues with character encoding in MySQL/PHP webpages.  
> I have a MySQL database which as far as I can make out has data stored 
> in Latin1 format which I believe is basically iso-8859-1.  I have some 
> PHP pages generated from the database with a meta tag set as follows:
>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
>
> But... when I browse the pages, the web browser (I've tried a number 
> of the usual browsers) sets it's encoding to UTF-8 and various 
> characters are bodged up.  If I manually set the browser encoding to 
> iso-8859-1 then all the characters are displayed ok.
>
> Any ideas why web browsers are ignoring the meta tag?  For a live 
> example see the first entry on the  following link:
>
> http://www.catalogueoflife.org/search_results.php?search_string=salmon&match_whole_words=on 
>
>
> Many thanks
>
> Peter
>



More information about the Sclug mailing list