by-expession

Expression Web Resources

Which character encoding should I use for HTML?

Latest post 04-01-2007 12:06 PM by cdwise. 3 replies.
  • 03-13-2007 1:01 AM

    • bookpage
    • Top 50 Contributor
    • Joined on 12-24-2006
    • Hewitt, TX
    • Posts 5

    Which character encoding should I use for HTML?

    I found this (somewhere), "XML parsers are only required to support UTF-8 and UTF-16. If you use anything other than that, there is no guarantee that the parser can interpret the document correctly. In reality, browsers generally seem to support the same range of encodings as for HTML, but if you want to be on the safe side, stick to UTF-8 or UTF-16."

    Cheryl says, on her website that, "The character set used in this site is charset=iso-8859-1 which is my Expressions web Design default."

    Just wondering what most of you use and/or suggest.

     TIA
     

     

     
     

         

    Waco Web Designs http://wacowebdesigns.com TAYLOR's BOOK PAGE http://taylorsbookpage.com Member of (IOBA) http://www.ioba.org Independent Online Booksellers Association ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Filed under:
  • 03-29-2007 6:38 PM In reply to

    • cdwise
    • Top 10 Contributor
    • Joined on 12-22-2006
    • Houston, TX
    • Posts 532

    Re: Which character encoding should I use for HTML?

    If it weren't for the BOM issue I'd say use UTF-8 but frankly XML parsers are not something I'm going to worry about with my xml since I never serve raw xml on my web pages.

    Cheryl D Wise MS MVP Expression Instructor: starttoweb.com

    Filed under:
  • 04-01-2007 3:10 AM In reply to

    Re: Which character encoding should I use for HTML?

    The character set you use depends largely on your preference. I usually use either ISO-8859-1 or ISO-8859-15, depending on the characters I need to use, because they're more specific to my demographic so they're a bit smaller than Unicode. Rarely does browser implementation take any longer than Unicode (if it ever does), but I like being specific when I can. If there are characters I need to use from both character sets (not often), or if I have no control over maintenance contracts (more often), I'll use UTF-8. Of course, Cheryl did raise a valid point about the BOM mark that Expression Web uses with UTF-8 being largely unsupported. (I hear Windows actually distorts ISO-8859-1 to its own desires by converting it to Windows-1252 or some such encoding, but that could just be Mac people feeding me this information!)

    For the record, I've designed entire sites in XML (most of which I've converted back to HTML because they take too long to load). I tested them in all modern browsers, and I never found an XML parser that didn't support ISO-8859-1 or ISO-8859-15, because, of course, all the parsers were Web browsers. As far as other parsers go, that'd largely depend on what you were using your XML document for.

    Also, I'm sure you already know this, but just in case you don't, XHTML pages are hardly ever parsed as XHTML or XML, but 99.999% of the time as HTML. The only time you'll see anything close to XML or true XHTML rendering is if you switch the MIME type of your document (done through .htaccess files or modifying the headers using server-side language) or if you name your file so that it ends with .xhtml or .xml. Even then, I'm told that Firefox uses a hybrid engine that they plan to correct in Firefox 3 or 4. I think XHTML does have a future in browsers as a subset of XML, but not until browsers get faster at parsing it.

    Jonathon VS Freelance Web Artist www.jonathonvs.com
    Filed under: ,
  • 04-01-2007 12:06 PM In reply to

    • cdwise
    • Top 10 Contributor
    • Joined on 12-22-2006
    • Houston, TX
    • Posts 532

    Re: Which character encoding should I use for HTML?

    I think someone is feeding you a line of BS re Windows converting ISO-8859-1 to Windows 1252 (or any other Windows characterset) but if you want to be certain you can always ask on the IE team blog.

     If you remind me before I go to MIX I'll try and rememer to ask Chris or whoever on the IE team is there.

    Cheryl D Wise MS MVP Expression Instructor: starttoweb.com

Page 1 of 1 (4 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems Sponsored by: Start to Web
@ 2005-2008 Cheryl D Wise