views:

105

answers:

2

Hi friends,

I have an index.html and global.css files. When I open these files at Coda, Textmate, etc. , everything looks fine. than I try in firefox, index.html loads css from right path, but it doesnt take effect. than I tried to see css code from firefox, and I see signs like;

ॵ氮扵汬整筰慤摩湧㨰‵灸‰′㕰硽畬⹢畬汥琠汩筬楳琭獴祬攺摩獣㭰慤摩湧㨲灸紮摲慷汩湥筢潲摥爭扯瑴潭㨱灸⁤慳桥搠⍣捣紣捯湴敮琠栱筦潮琺㈲灸⁇敯牧楡

and css doesnt work. do you have any idea about the problem?

I tried to create fresh new css, and write the code in, but same problem happens again.


index.html

<link rel="stylesheet" href="css/global.css" type="text/css" media="screen" />

appreciate!!! thanks a lot!

A: 

check the servers/css file encoding

n00b32
how can i do that? same problem at both localhost and server.
artmania
+3  A: 

Can it be that your CSS file is UTF-16 encoded, while your HTML document is ISO-8859-1 / UTF-8, or the other way around? This question has been around on SO several times, and this was always the answer.

Update: Here is one.

Pekka
my css starts as ul.bullet{padding:0 5px 0 25px}ul.bullet li{list-style:di.........bla bla... so how can I define any UTF? :/
artmania
@artmania In some IDEs, you can select the encoding in the save dialog. Make sure you check both the HTML file and CSS.
Pekka
I opened the css and Saved As UTF8 with textmate, but still same problem :/
artmania
THANKS SO MUCH!!! Saved my life!!! I dont how it happened but my index.html was in UTF16 (Little Endian). I made it UTF8 and now working perfect!!! ps, I could see this with Textmate. Coda doesnt show that! :/
artmania