[sclug] Character encoding - summary
Peter Brewer
p.w.brewer at reading.ac.uk
Thu Dec 7 14:54:51 UTC 2006
Many thanks for everyone's replies. To summarise:
Most modern browsers ignore character encoding meta tags for various
technical reasons, so they are essentially useless. There are two ways
to deal with this problem:
1) Set the encoding in your web server e.g. in Apache using the
directive "AddDefaultCharset iso-8859-1". This is of course server wide
though so may not be terribly desirable.
2) Set the encoding in the headers, in my case using PHP:
header("Content-Type: text/html; charset=iso-8859-1");
So in answer to Sean's question - no I haven't found another way to do
it using META tags.
Cheers
Peter
Sean Furey wrote:
> On Thu, Dec 07, 2006 at 02:06:03PM +0000, Peter Brewer wrote:
>
>> After struggling with this all morning... I stumbled across the answer
>> five minutes after emailing you. Typical!
>>
>
> Do share :-)
>
> To me the correct thing to do would be put the charset in the HTTP
> headers, not a META tag, but that's not always possible, so I'd be
> interested if you found any solutions using the META tags...
>
> Sean
>
More information about the Sclug
mailing list