Reputation: 1099
I have created web page using Chinese. When I view the page with Google chrome, all Chinese characters are corrupted. Do I have to add something in HTML page?
Upvotes: 16
Views: 70432
Reputation: 21
use utf-8 character set otherwise it will all be code
remember <meta charset="utf-8"
Upvotes: 2
Reputation: 2426
There are two ways to define the encoding of your page. You should include inside your <head>
tags an encoding tag, two ways to do that follow below:
Short way:
<meta charset="utf-8">
Long way:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
You can have more details about the difference between these two ways in this question:
If you want to see a real example, take a look in the weibo.com source code at this line of code.
Upvotes: 21
Reputation: 232
Make sure to use UTF-8 or a comparable encoding. This can be made sure in the http headers:
Content-Type: text/html; charset=utf-8
Upvotes: 3