[whatwg] Default encoding to UTF-8?
Henri Sivonen
hsivonen at iki.fi
Wed Dec 7 00:03:48 PST 2011
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/
More information about the whatwg
mailing list