Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Both forms of the <a href="http://www.w3schools.com/tags/att_meta_charset.asp" rel="noreferrer">meta charset</a> declaration are equivalent and should work the same across browsers. But, there are a few things you need to remember when declaring your web files character-set as UTF-8:</p> <ol> <li>Save your file(s) in UTF-8 encoding <em>without</em> the <a href="http://www.w3.org/International/questions/qa-byte-order-mark" rel="noreferrer">byte-order mark</a> (BOM).</li> <li>Declare the encoding in your HTML files using <a href="http://www.w3schools.com/tags/att_meta_charset.asp" rel="noreferrer">meta charset</a> (like above).</li> <li>Your web server <em>must</em> serve your files, declaring the UTF-8 encoding in the Content-Type HTTP header.</li> </ol> <p>Apache servers are configured to serve files in ISO-8859-1 by default, so you need to add the following line to your <code>.htaccess</code> file:</p> <pre><code>AddDefaultCharset UTF-8 </code></pre> <p>This will configure Apache to serve your files declaring UTF-8 encoding in the Content-Type response header, but your files <em>must</em> be saved in UTF-8 (without BOM) to begin with.</p> <p>Notepad cannot save your files in UTF-8 without the BOM. A free editor that can is <a href="http://notepad-plus-plus.org/" rel="noreferrer">Notepad++</a>. On the program menu bar, select "Encoding > Encode in UTF-8 without BOM". You can also open files and re-save them in UTF-8 using "Encoding > Convert to UTF-8 without BOM".</p> <p>More on the <a href="http://en.wikipedia.org/wiki/Byte_order_mark" rel="noreferrer">Byte Order Mark (BOM) at Wikipedia</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload