gpt4 book ai didi

css - ISO-8859-1 与 UTF-8?

转载 作者:数据小太阳 更新时间:2023-10-29 09:11:14 24 4
gpt4 key购买 nike

应该在什么时候使用什么?还是使用 UTF-8 总是更好?或者 ISO-8859-1在特定条件下仍然重要吗?

字符集是否与地理区域相关?


使用代码 @charset "utf-8"; 有什么好处吗? ?

或者像这样<link type="text/css; charset=utf-8" rel="stylesheet" href=".." />

在 CSS 文件的顶部?

我找到了这个

If Dreamweaver adds the tag when youadd embedded style to the document,that is a bug in Dreamweaver. From theW3C FAQ:

"For style declarations embedded in adocument, @charset rules are notneeded and must not be used."

The charset specification is a part ofCSS since version 2.0 (may 1998), soif you have a charset specification ina CSS file and Safari can't handle it,that's a bug in Safari.

并在表单中添加accept-charset:

<form action="/action" method="post" accept-charset="utf-8">

如果我使用 XHTML 文档类型,应该使用什么?

<?xml version="1.0" encoding="UTF-8"?>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

最佳答案

Unicode 正在接管并且已经超越了所有其他的。我建议你现在就跳上火车。

请注意,Unicode 有多种风格。 Joel Spolsky gives an overview .

Unicode is winning(图表当前为 Feb. 2012,请参阅下面的评论以获得更精确的值。)

关于css - ISO-8859-1 与 UTF-8?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1893946/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com