W3C home > Mailing lists > Public > www-validator@w3.org > July 2003

Re: shift_jis,iso-8859-1

From: Terje Bless <link@pobox.com>
Date: Sun, 27 Jul 2003 04:44:13 +0200
To: W3C Validator <www-validator@w3.org>
cc: Spoggel@aol.com
Message-ID: <b02000103-1026-359647C8BFDC11D7B4C80030657B83E8@[]>

Hash: SHA1

Spoggel@aol.com wrote:

Please don't send HTML email to Internet mailinglists!

>>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
>><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

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.

Version: PGP SDK 3.0.2

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

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:37 UTC