Reputation: 1800
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?
Upvotes: 7
Views: 49475
Reputation: 249
Thanks to all answerers, but I have had troubles solving it, as I saved the file in two editors (Leafpad and vim) as UTF-8, still getting weird characters in browser. The culprit was, as described here, the byte order mark, which seems not to be set by default in both the editors but has to be set explicitly in vim:
:set bomb
This solved the problem for me finally.
Upvotes: 1
Reputation: 108
Is your doctype HTML5
<!DOCTYPE html>
if not you have to use this for all other doctypes
<meta http-equiv="content-type" content="text/html; charset=utf-8">
Upvotes: 5
Reputation: 943579
Because either:
Upvotes: 19