Skip to content

Commit 2e8e564

Browse files
committed
[css-syntax] Recommend that newer document types not provide an environment encoding.
1 parent cf448c7 commit 2e8e564

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

css-syntax/Overview.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,6 @@ <h3 class="heading settled heading" data-level=3.2 id=input-byte-stream><span cl
464464
where the "…" is the sequence of bytes corresponding to the encoding’s label.
465465
</details>
466466

467-
<p> UAs may impose an arbitrary limit upon the number of <code>XX</code> bytes scanned,
468-
as long as it is large enough to encompass all of the <a href=http://encoding.spec.whatwg.org/#label>labels</a> defined in <a data-biblio-type=normative data-link-type=biblio href=#encoding title=encoding>[ENCODING]</a>;
469-
at the time of writing this specification these are all 19 or fewer bytes long.
470-
471467
<p> If the return value was <code>utf-16be</code> or <code>utf-16le</code>,
472468
use <code>utf-8</code> as the fallback encoding;
473469
if it was anything else except failure,
@@ -500,6 +496,11 @@ <h3 class="heading settled heading" data-level=3.2 id=input-byte-stream><span cl
500496
Otherwise, if an <a data-link-type=dfn href=#environment-encoding0 title="environment encoding">environment encoding</a> is provided by the referring document,
501497
use that as the fallback encoding.
502498

499+
<p> Note that the concept of <a data-link-type=dfn href=#environment-encoding0 title="environment encoding">environment encoding</a> is required for legacy purposes
500+
for HTML and XML.
501+
New types of referring documents <strong>should not</strong> provide an <a data-link-type=dfn href=#environment-encoding0 title="environment encoding">environment encoding</a>,
502+
so the stylesheet defaults to UTF-8 instead in the absence of more explicit information.
503+
503504
<li>
504505
Otherwise, use <code>utf-8</code> as the fallback encoding.
505506
</ol>

css-syntax/Overview.src.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ <h3 id="input-byte-stream">
334334
Otherwise, if an <a>environment encoding</a> is provided by the referring document,
335335
use that as the fallback encoding.
336336

337+
Note that the concept of <a>environment encoding</a> is required for legacy purposes
338+
for HTML and XML.
339+
New types of referring documents <strong>should not</strong> provide an <a>environment encoding</a>,
340+
so the stylesheet defaults to UTF-8 instead in the absence of more explicit information.
341+
337342
<li>
338343
Otherwise, use <code>utf-8</code> as the fallback encoding.
339344
</ol>

0 commit comments

Comments
 (0)