Forum Moderators: open

Message Too Old, No Replies

charset: utf-8 vs us-ascii vs iso-8859-1

         

MikeInNM

3:20 pm on May 10, 2003 (gmt 0)

10+ Year Member



A bit confused about the proper charset declaration. Most of my HTML editors default to the iso but one of my validators recommended using us-ascii and said it was the most popular on the internet.

could someone enlighten me as to the pros and cons of these and which would be the best and safest. my pages are in us english and don't use any particular special symbols other than

copyright
trademark
degree

quiet_man

3:37 pm on May 10, 2003 (gmt 0)

10+ Year Member



Hi Mike, and welcome!

In general you will find that most questions have already been asked on WebmasterWorld. Use the site search facility (in the top menu bar, above) to save yourself some time. You can also use a search engine such as FAST to search these boards. Just use "webmasterworld + your_search_term" - may be quicker than the site search.

The following threads all provide info on your question:

doctype charset=confused. What does it all mean? [webmasterworld.com]

doctype declaration - how do I establish HTML version? [webmasterworld.com]

which content type/charset to use [webmasterworld.com]

<meta http ..... charset=us-ascii"> - is this the best charset to use? [webmasterworld.com]

DrDoc

4:57 pm on May 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



us-ascii = plain text (a-z, 0-9 ... no characters over ascii 127)
ISO-8859-1 = technical name for "latin-1" or "Western European" (which English falls under)
utf-8 = unicode... supports almost everything ;)

No matter if you're using plain text with ot without "special characters" I recommend always using ISO-8859-1 since it is more widely supported than us-ascii. It also narrows the encoding down a little bit. Finally, since that's the encoding English falls under, it is the natural choice...

Oaf357

8:40 pm on May 10, 2003 (gmt 0)

10+ Year Member



I use UTF-8.

Why?

It's shorter than any of the others (less code) and has a wide range of support.

DrDoc

9:16 pm on May 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



shorter

LOL well, by like 5 letters...

UTF-8 works fine for pure HTML4 pages. It also works fine on IE (because it doesn't care). But, once you move to XHTML and open the page in other browsers, certain characters might not always be displayed as intended. Opera 6 is the most troublesome...

However, switching to ISO-8859-1 (and that being the only change) has always solved the problem for me...

Oaf357

9:37 pm on May 10, 2003 (gmt 0)

10+ Year Member



I have no problem with XHMTL and UTF-8 in Opera.

papabaer

10:59 pm on May 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good reading: C.9. Character Encoding [w3.org] and 3.1.1.5 Strictly Conforming Documents [w3.org]

Most problems with character entities arise when Webmasters specify fonts with limited character sets.

The font "arial unicode MS" is a monster! This sucker has everything AND the kitchen sink! The file size weighs in at 23,566kb! So much for font-embedding! LOL!, The good news, this font is present on most Windows systems... the bad news is, this font is present on most WINDOWS systems.... Arial, though nowhere near as ambitious as its big brother, does have excellent character entity support. Verdana, a very trendy font, does not share this level of support.

The Geneva font, has decent character support for Mac systems, but again... not even in the same ball park compared to Arial Unicode.

MikeInNM

2:42 am on May 11, 2003 (gmt 0)

10+ Year Member



I have always used iso-8859-1 and of course never had any probs or heard any complaints. I was just thrown off when one of my validators said "unless there was a specific reason for using it consider using us-ascii as it was the most widely used on the internet.

This took me by surprise as about 90% of what I see and all of my html editors default to 8859-1.

Why would they say that?

I don't see the support or evidence of that.

The validator I use is good and it's well respected software I believe.

mozopera

2:53 am on May 11, 2003 (gmt 0)

10+ Year Member



If I can assume that you're referring to CSE, That message will be removed in the next version. In fact, it seems to be gone already in the BETAs.