character-encoding-024

blank line before @charset

WeasyPrint

This browser

Flags
http
Assertion
If a @charset declaration is not on the first line of the file, the encoding declaration will not be recognised.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html lang="en">
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>CSS Test: blank line before @charset</title>
 5 <link rel="author" title="Richard Ishida" href="http://rishida.net">
 6 <!-- placeholdercomment -->
 7 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset">
 8 <link rel="alternate" href="http://www.w3.org/International/tests/tests-html-css/tests-character-encoding/generate?test=41">
 9 <meta name="flags" content="http">
10 <meta name="assert" content="If a @charset declaration is not on the first line of the file, the encoding declaration will not be recognised.">
11 <style type="text/css">
12 /* the CSS below is not part of the test */
13 .test { font-size: 40px; }
14 .test img { vertical-align: middle;  }
15 .test td { padding-right: 60px; }
16 </style>
17 <link rel="stylesheet" type="text/css" href="support/charset15-blankline.css">
18 </head>
19 <body>
20 <p class="instructions">Test passes if there is a green rectangle below.</p><p class="instructionNote">This test is only valid if the user agent recognises the @charset rule.  </p>
21 
22 
23 <div class="test"><span style="background-color: #0000FF; color: #0000FF;"><span class="ÜÀÚ">text</span></span></div>
24 
25 
26 <!--p class="notes">Notes: <br />The HTML page is served as UTF-8. The CSS stylesheet is in ISO 8859-15.  For the test to be successful, the stylesheet has to be read as ISO 8859-15.  The @charset rule is not correctly formed, so should be ignored, but the stylesheet should still be used.</p><p class='notes'>If the box is blue, the stylesheet hasn't been read at all.</p-->
27 </body>
28 </html>