W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2011

[whatwg] Default encoding to UTF-8?

From: Henri Sivonen <hsivonen@iki.fi>
Date: Wed, 7 Dec 2011 10:03:48 +0200
Message-ID: <CAJQvAucDdXCC9YR0GORNTtPCyS5qo-PkwJ_rYeMkCCRKwWk=dg@mail.gmail.com>
On Tue, Dec 6, 2011 at 2:10 AM, Kornel Lesi?ski <kornel at geekhood.net> wrote:
> On Fri, 02 Dec 2011 15:50:31 -0000, Henri Sivonen <hsivonen at iki.fi> wrote:
>
>> That compatibility mode already exists: It's the default mode--just
>> like the quirks mode is the default for pages that don't have a
>> doctype. You opt out of the quirks mode by saying <!DOCTYPE html>. You
>> opt out of the encoding compatibility mode by saying <meta
>> charset=utf-8>.
>
>
> Could <!DOCTYPE html> be an opt-in to default UTF-8 encoding?
>
> It would be nice to minimize number of declarations a page needs to include.

I think that's a bad idea. We already have *three*
backwards-compatible ways to opt into UTF-8. <!DOCTYPE html> isn't one
of them. Moreover, I think it's a mistake to bundle a lot of unrelated
things into one mode switch instead of having legacy-compatible
defaults and having granular ways to opt into legacy-incompatible
behaviors. (That is, I think, in retrospect, it's bad that we have a
doctype-triggered standards mode with legacy-incompatible CSS defaults
instead of having legacy-compatible CSS defaults and CSS properties
for opting into different behaviors.)

If you want to minimize the declarations, you can put the UTF-8 BOM
followed by <!DOCTYPE html> at the start of the file.

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/
Received on Wednesday, 7 December 2011 00:03:48 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:38 UTC