Hey all, I'm making a website in two languages - one version in English and one version in Russian. The English version, saved as ANSI files, is fine. However, the Russian version, saved as Unicode files (otherwise cyrillic turns to gibberish), fails to load the .css file when browsed in Firefox (IE loads everything perfectly). For the record, the coding in the two versions is the same, and the line relating the .css file to the .html files looks like this - <Link Href="Design.css" Type="Text/Css" Rel="Stylesheet" /> Code (markup): The only solution I've found is to copy the entire .css file to each .html page, and I don't want to do that. Any ideas? Thanks in advance, Dan.
Why don't you save your css as UTF-8 ? If I were you - I save all files as UTF-8, use meta tag to point to UTF-8 and select xhtml doctype...
Thanks Uzi, I am not familiar with UTF-8, and a quick search results explain what it is, rather than how to save .html and .css files... so any explanation about how to save and how to select xhtml doctype (and generally how to do what you suggested) would be great. Dan.
First, to save the files as utf-8, click save as. You should see a box that says something like 'character encoding'. Select utf-8. In any Windows editor, do not choose Unicode. In your html document, you should have this line in the <head> section: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Code (markup): Open a document in your browser (one that's on your server host), and use Firefox's web developer extension to view the server response header. Using wget, DP's response header looks like this: gt@koko:~$ wget -S http://forums.digitalpoint.com --2008-08-30 12:34:55-- http://forums.digitalpoint.com/ Resolving forums.digitalpoint.com... 216.9.35.60 Connecting to forums.digitalpoint.com|216.9.35.60|:80... connected. HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Sat, 30 Aug 2008 17:34:55 GMT Server: Apache Set-Cookie: bbsessionhash=ee9b9f86db066f7e5c3d82524bbbfe83; path=/; HttpOnly Set-Cookie: bblastvisit=1220117695; expires=Sun, 30-Aug-2009 17:34:55 GMT; path=/ Set-Cookie: bblastactivity=0; expires=Sun, 30-Aug-2009 17:34:55 GMT; path=/ Cache-Control: private Pragma: private Connection: close [color=red]Content-Type: text/html; charset=UTF-8[/color] Length: unspecified [text/html] Code (markup): If the header does not contain the hi-lited line, your document's http-equiv meta tag tells the browser which to use. The server header rules, and in the line's absence, the meta element provides backup. If your server response does have the line, but it says something other than utf-8, you'll need to use your .htaccess file to add the header (do it only if the default header specifies a charset and it's not utf-8. You're ok if it says nothing). AddDefaultCharset UTF-8 Code (markup): Put that in your document root directory's .htaccess file. cheers, gary