can't show greek letters in browser

拜拜、爱过 提交于 2019-12-07 01:29:26

问题


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



来源:https://stackoverflow.com/questions/15438046/cant-show-greek-letters-in-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!