更改字符集时也更改 xmlns 吗?

发布于 2024-09-15 20:49:35 字数 162 浏览 7 评论 0原文

在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

说不完的你爱 2024-09-22 20:49:35

您混淆了字符编码和语言。

如果您想以希腊语显示网页,请使用“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.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文