can't show greek letters in browser

2019-04-24 22:53发布

问题:

I am developing a website using html and css and i can't see greek letters.Instead of this,i only see symbols. i have the following line in my html file:

<meta http-equiv="content-type" content="text/html;charset=utf-8" />

I also tried:

<meta http-equiv="content-type" content="text/html;charset=windows-1253" />
<meta http-equiv="content-type" content="text/html;charset=ibm869" />
<meta http-equiv="content-type" content="text/html;charset=ibm737" />
<meta http-equiv="content-type" content="text/html;charset=iso-8859-7"/>
<meta http-equiv="content-type" content="text/html;charset=x-mac-greek"/>
<meta http-equiv="content-type" content="text/html;charset=x-EBCDIC-GreekModern "/>
<meta http-equiv="content-type" content="text/html;charset=x-EBCDIC-Greek "/>

Nothing worked! p.s. I tried this in Firefox and Internet Explorer

回答1:

As per your comment

Open your file in Notepad, File -> Save As from the top menu, then there's a drop down in the save as dialogue where you can select character encoding. Make sure UTF-8 is chosen rather than ANSI

Once the file has been saved as UTF-8 then you should have no problems adding Greek letters, (or Russian, Hebrew, Japanese or whatever)



回答2:

Per the comments / answers here, you'll need to check to see what the encoding is set to. Best way would be to see exactly how the server is sending it by inspecting the Response Headers. You can do this with Developer Tools on most browsers.

I just inspected the headers for this page using Chrome:



回答3:

I had the same problem while developing a page in greek. The problem wasn't the utf-8. I had to correct the CSS.

Regards,

Nick