ISO-8859-1对比UTF-8? [英] ISO-8859-1 vs UTF-8?

查看:141
本文介绍了ISO-8859-1对比UTF-8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应该使用什么和什么时候?或者总是更好地使用UTF-8?



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



< hr>

编辑



将此代码 @charsetutf-8;



或像这样< link type =text / css; CSS文件顶部的charset = utf-8 =stylesheethref =../>



我发现这个


如果DreamWeaver在
为文档添加嵌入式样式,
是DreamWeaver中的一个错误。从
W3C常见问题解答:



对于嵌入在
文档中的样式声明,@charset规则不需要



字符集规范是2.0版本(可能是1998年)的
CSS的一部分,所以
如果你有一个字符集规范in
a CSS文件和Safari无法处理,
是Safari中的错误。


accept-charset 形式

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

如果我使用xhtml doctype,应该使用什么

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

 < meta http-equiv =Content-Typecontent =text / html; charset = UTF-8/> Unicode正在接管,已经超过所有其他方法。


解决方案

我建议你现在就在火车上。



请注意,有几种口味的unicode。 ,请参阅下面的注释获取更准确的值。)


What should be used and when ? or is it always better to use UTF-8 always? or ISO-8859-1 still has importance in specific conditions?

Is Character-set related to geographic region?


Edit:

Is there any benefit to put this code @charset "utf-8";

or like this <link type="text/css; charset=utf-8" rel="stylesheet" href=".." />

at the top of CSS file?

I found for this

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.

and add accept-charset in form

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

and what should be use if i use xhtml doctype

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

or

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

解决方案

Unicode is taking over and has already surpassed all others. I suggest you hop on the train right now.

Note that there are several flavors of unicode. Joel Spolsky gives an overview.

(Graph current as of Feb. 2012, see comment below for more exact values.)

这篇关于ISO-8859-1对比UTF-8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆