Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
497 views
in Technique[技术] by (71.8m points)

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

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" />
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...