css – ISO-8859-1 vs UTF-8?

前端之家收集整理的这篇文章主要介绍了css – ISO-8859-1 vs UTF-8?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
应该使用什么和什么时候?或者总是更好地使用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 you
add embedded style to the document,
that is a bug in DreamWeaver. From the
W3C FAQ:

“For style declarations embedded in a
document,@charset rules are not
needed and must not be used.”

The charset specification is a part of
CSS since version 2.0 (may 1998),so
if you have a charset specification in
a 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 doctype应该使用什么

<?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

(图表电流为Feb. 2012,请参阅以下注释获取更准确的值。)

原文链接:https://www.f2er.com/css/222594.html

猜你在找的CSS相关文章