Results 1 to 2 of 2

Thread: setting character encoding in HTML

  1. #1

    Thread Starter
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332

    setting character encoding in HTML

    I was trying to validate some HTML I was writing by hand with http://validator.w3c.org by uploading the file from my hard drive. But I keep getting this message:


    quote:

    No Character Encoding Found! Falling back to UTF-8.
    ...SNIP...
    The uploaded file was tentatively found to be Valid. That means it would validate as HTML 4.0 Transitional if you updated the source document to match the options used (typically this message indicates that you used either the Document Type override or the Character Encoding override).



    and no matter what I try I can't seem to get it validated and searches have not turned out too helpful. My html header looks like

    quote:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

    <html>

    <head>
    <title>The Title!</title>
    <META HTTP-EQUIV="HTML" CONTENT="text/html; charset=iso-8859-1">
    </head>



    The page will be in Polish which uses non-english characters (but it still latin based; it is not Cyrillic) so it seems that either UTF-8 or iso-8859-1 should be good candidates.
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    You just need to modify the meta tag. It should read "Content-Type":
    Code:
     
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width