Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML meta charset not working

Tags:

html

At the beginning of my page, I have the following code:

<HTML>
<head>
<meta charset="utf-8">
<title> 
//other

I used the meta because I have to put in my website some Japanese characters. Here you can see an example:

<tr>
<td><label class="blacktd" onmouseover="apriimg('imgbox', '4');"> Shy Guy Bazaar </label></td>
<td><a href="http://www.youtube.com/watch?v=kpmkZIcD7fc">2'03"007</a></td>
<td>そうめん</td> //look at here
<td><img src="http://mk7vrlist.altervista.org/flags/jp.gif" /></td>
<td>2013/06/30</td>
</tr>

I googled this and I saw that I simply need to put that tag with the charset attribute. By the way my webpage shows %u305D%u3046%u3081%u3093 instead of "そうめん". Do you know why?

like image 802
Alberto Rossi Avatar asked Aug 17 '13 17:08

Alberto Rossi


People also ask

How do I set HTML to UTF-8?

The character encoding should be specified for every HTML page, either by using the charset parameter on the Content-Type HTTP response header (e.g.: Content-Type: text/html; charset=utf-8 ) and/or using the charset meta tag in the file.

Does UTF-8 need meta charset?

Furthermore, most browsers use UTF-8 by default if no character encoding is specified. But because that's not guaranteed, it's better to just include a character encoding specification using the <meta> tag in your HTML file. There you have it.

Why UTF-8 is used in HTML?

Why use UTF-8? An HTML page can only be in one encoding. You cannot encode different parts of a document in different encodings. A Unicode-based encoding such as UTF-8 can support many languages and can accommodate pages and forms in any mixture of those languages.

What is meta charset UTF in HTML?

Definition and UsageThe charset attribute specifies the character encoding for the HTML document. The HTML5 specification encourages web developers to use the UTF-8 character set, which covers almost all of the characters and symbols in the world!


1 Answers

Because either:

  • You have an HTTP header which specifies a different character encoding (HTTP headers take priority over meta elements) or
  • You haven't saved the document using UTF-8 (you are just telling the browser that you are)
like image 114
Quentin Avatar answered Oct 08 '22 14:10

Quentin