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?
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With