简体   繁体   English

为了支持中文/日语字符,HTML文档中的字符集声明应该是什么?

[英]To support Chinese/Japanese characters what should be the character set declaration in HTML document?

I tried with the following string 我尝试了以下字符串

content=”text/html; charset=utf-8”

Though I can experiment myself. 虽然我可以自己做实验。 I don't know Japanese characters so can't verify browsers displaying it correctly or not. 我不知道日语字符,因此无法验证浏览器是否正确显示它。

Thanks for any help. 谢谢你的帮助。

utf-8 covers most countries all over the world. utf-8覆盖了世界上大多数国家。 Though not all of these countries' characters, this encoding suffices civil use. 尽管不是所有这些国家/地区的字符,此编码也足以满足民用要求。

if you got the Chinese characters right, then i assume your server side job is done. 如果您的汉字正确,那么我认为您的服务器端工作已经完成。

UTF-8 is right. UTF-8是正确的。 It can represent any Unicode character, and Unicode has pretty good coverage of any character you're likely to want in your document. 它可以表示任何Unicode字符,并且Unicode可以很好地覆盖文档中可能需要的任何字符。 Everyday Japanese doesn't even scratch the surface of Unicode — heck, the standard even has codepoints for the Deseret alphabet . 每天,日语甚至都不会刮擦Unicode的表面-哎呀,该标准甚至包含Deseret字母表的代码点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM