[sclug] Character encoding

Robin Lewis goten at squad-wars.com
Thu Dec 7 14:11:02 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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
>
>
I would imagine it depends on the browser and the W3C standard you're
writing to. If you're using XHTML you may want to use the XML
declaration instead of the meta tag (meta is deprecated, if memory
serves).

Also, that page works for me. Don't know exactly what's happening your
end (maybe you need some screenshots?)

- --
Robin Lewis
Proud Slackware user
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFeCD8g5OW9OQFrSMRApFoAKC2ugBlJGWxMwJBsQvHdvkCUQGMeQCglv/h
ZSeUH2I0KR9lTF2u0ZSoxnk=
=K4J8
-----END PGP SIGNATURE-----



More information about the Sclug mailing list