更改字符集时也更改 xmlns 吗?
在 ISO-8859-7(希腊语)中设置网页时,是否应该将 xmlns 从“en”更改为“el”?所以它会是:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="el" lang="el">
Should I alter the xmlns into 'el' from 'en' when setting up a webpage in ISO-8859-7 (Greek)? So it would be:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="el" lang="el">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您混淆了字符编码和语言。
如果您想以希腊语显示网页,请使用“el”。使用什么编码并不重要,但我会使用 UTF-8 或纯 ASCII(一定喜欢 XML 实体引用!)。
如果您看到“接受字符集:ISO-8859-7”并使用它来确定要显示的语言...您所定位的浏览器有多旧?它是否提供了更好的设置语言的方法?
(诚然,Windows 多年来并没有明智地执行 i18n — 您必须下载适合您的语言的更新/补丁,否则它们会拒绝安装,这使得“ENU”成为许多人最实用的选择。ISTR 他们在 Vista 或 7 中修复了此问题.)
You're confusing character encoding and language.
If you want to display a webpage in Greek, then use "el". It doesn't matter (much) what encoding you use, but I would use UTF-8 or plain ASCII (gotta love XML entity references!).
If you see "Accept-Charset: ISO-8859-7" and are using it to determine what language to display in... how old is the browser you're targeting? Does it offer no better way to set a language?
(Admittedly Windows didn't do i18n sensibly for ages — you had to download updates/patches for your language or they would refuse to install, making "ENU" the most practical choice for many people. ISTR that they fixed this in Vista or 7.)