Wed, 08 Jan 2014 11:50:32 +0000
[css-syntax] Clarify @charest vs. ASCII-incompatible encodings.
css-syntax/Overview.html | file | annotate | diff | comparison | revisions | |
css-syntax/Overview.src.html | file | annotate | diff | comparison | revisions |
1.1 --- a/css-syntax/Overview.html Mon Jan 06 10:43:50 2014 -0800 1.2 +++ b/css-syntax/Overview.html Wed Jan 08 11:50:32 2014 +0000 1.3 @@ -54,7 +54,7 @@ 1.4 </p> 1.5 <h1 class="p-name no-ref" id=title>CSS Syntax Module Level 3</h1> 1.6 <h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft, 1.7 - <span class=dt-updated><span class=value-title title=20140103>3 January 2014</span></span></span></h2> 1.8 + <span class=dt-updated><span class=value-title title=20140108>8 January 2014</span></span></span></h2> 1.9 <div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-syntax/>http://dev.w3.org/csswg/css-syntax/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-syntax-3/>http://www.w3.org/TR/css-syntax-3/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-syntax/>http://dev.w3.org/csswg/css-syntax/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2013/WD-css-syntax-3-20131105/ rel=previous>http://www.w3.org/TR/2013/WD-css-syntax-3-20131105/</a><dd><a href=http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/ rel=previous>http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/</a> 1.10 <dt>Feedback:</dt> 1.11 <dd><a href="mailto:www-style@w3.org?subject=%5Bcss-syntax%5D%20feedback">www-style@w3.org</a> 1.12 @@ -464,12 +464,17 @@ 1.13 is the string "<code>@charset "…";</code>", 1.14 where the "…" is the sequence of bytes corresponding to the encoding’s label. 1.15 1.16 -<p> If the return value was <code>utf-16</code> or <code>utf-16be</code>, 1.17 +<p> If the return value was <code>utf-16be</code> or <code>utf-16le</code>, 1.18 use <code>utf-8</code> as the fallback encoding; 1.19 if it was anything else except failure, 1.20 use the return value as the fallback encoding. 1.21 1.22 -<p class=note> Note: This mimics HTML <code><meta></code> behavior. 1.23 +<p class=note> Note: UTF-16BE and UTF-16LE are the only ASCII-incompatible encodings that 1.24 + <a href=http://encoding.spec.whatwg.org/#concept-encoding-get>get an encoding</a> 1.25 + can return. 1.26 + Using one of them to decode the ASCII <code>@charset "…";</code> byte sequence 1.27 + would result in garbage. 1.28 + This mimics HTML <code><meta></code> behavior. 1.29 1.30 <li> 1.31 Otherwise, if an <a data-link-type=dfn href=#environment-encoding0 title="environment encoding">environment encoding</a> is provided by the referring document,
2.1 --- a/css-syntax/Overview.src.html Mon Jan 06 10:43:50 2014 -0800 2.2 +++ b/css-syntax/Overview.src.html Wed Jan 08 11:50:32 2014 +0000 2.3 @@ -301,12 +301,17 @@ 2.4 is the string "<code>@charset "…";</code>", 2.5 where the "…" is the sequence of bytes corresponding to the encoding's label. 2.6 2.7 - If the return value was <code>utf-16</code> or <code>utf-16be</code>, 2.8 + If the return value was <code>utf-16be</code> or <code>utf-16le</code>, 2.9 use <code>utf-8</code> as the fallback encoding; 2.10 if it was anything else except failure, 2.11 use the return value as the fallback encoding. 2.12 2.13 - Note: This mimics HTML <code><meta></code> behavior. 2.14 + Note: UTF-16BE and UTF-16LE are the only ASCII-incompatible encodings that 2.15 + <a href="http://encoding.spec.whatwg.org/#concept-encoding-get">get an encoding</a> 2.16 + can return. 2.17 + Using one of them to decode the ASCII <code>@charset "…";</code> byte sequence 2.18 + would result in garbage. 2.19 + This mimics HTML <code><meta></code> behavior. 2.20 2.21 <li> 2.22 Otherwise, if an <a>environment encoding</a> is provided by the referring document,