I am experiencing problem with UTF-8 encoding in document like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>My Site</title><link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> ... </body> </html>
Browser and HTML validator, both detects windows-1250 encoding instead of utf-8, which is listed in headers. Could anybody help with this, plz?
How are you saving your HTML files, Mareq? Many programs allow you to save your pages in UTF-8 encoding, but you will need to specify this in your program's preferences.
Windows programs like Notepad can be problematic in this regard as they usually save documents with the default Windows encoding (in your case, windows-1250). In Windows XP Notepad, you can specify UTF-8 but the files are prefixed with a byte order mark that can cause difficulties - best to use a proper UTF-8-capable text editor or wysiwyg program.