Re: shift_jis,iso-8859-1

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

Spoggel@aol.com wrote:

Please don't send HTML email to Internet mailinglists!

[<http://members.aol.com/spoggel/turkeat.htm>]
>>The detected character encoding was "shift_jis,iso-8859-1".
>
>For some reason, whenever I validate this page, the [Character
>encoding] is "Shift_JIS" .. even though I used the following META
>statement:
>
>><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
>
>What am I doing wrong?

Well, apart from even trying to use the <meta> element to set the encoding --
this is a hack and really (*really*) shouldn't be used unless absolutely
necessary -- you, as the author of that page, haven't done anything wrong.

Whoever administers your web server however, has slipped up slightly during
configuration. S/he's probably added the Apache configuration directive
"AddDefaultCharset" or "AddCharset" and set it to "Shift_JIS,ISO-8859-1"
thinking it to be a list of comma-separated values. It is actually just a
single value and so should be set to either "Shift_JIS" or "ISO-8859-1" but
not both.

Depending on what exactly was the intent behind this, I'm sure there are many
ways to achieve the desired goal. See the Apache documentation (or rather,
refer you server admin to it) for more information. In particular, see
<http://httpd.apache.org/docs/mod/mod_mime.html#addcharset> and
<http://httpd.apache.org/docs/mod/core.html#adddefaultcharset>.


My personal recommendation is to set Apache's default charset to UTF-8, but
allow individual authors to override it; either with their own
AddDefaultCharset in a ".htaccess" file, or by using Content Negotiation to
let Apache automatically select the best charset based on filename extension.
This latter is a bit tricky to get used to, but enormously powerfull once you
get the hang of it. See
<http://httpd.apache.org/docs/content-negotiation.html> for more information.


- -- 
"Allright... Calm down! Relax! Start breathin´..."         -- Dr. D.R.E.

-----BEGIN PGP SIGNATURE-----
Version: PGP SDK 3.0.2

iQA/AwUBPyM8fKPyPrIkdfXsEQImdACcCK5w0eyMbvmrrurPTq7SEClTm60AmgMt
wujGeG4kraxUoFnNjlJPGxJd
=NHO9
-----END PGP SIGNATURE-----

Received on Saturday, 26 July 2003 22:44:33 UTC