turkish characters problem

吃可爱长大的小学妹 提交于 2019-12-11 10:53:25

问题


i have created a page in turkish language. To show turkish characters on webpage i always use following character set.

<meta http-equiv="content-type" content="text/html; charset=iso-8859-9">

but today something strange is happening. Here is my page. http://khawajatraders.biz/map/exterior.php . When i use above characterset characters in bottom navigation are display as they should but characters on right side navigation are not displayed correctly.

On the other hand when i use following character set, characters on right are display as they should while characters in bottom are converted into diamonds.

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

can anyone help me ?? How can i fix this problem. Is there a way to convert all characters into turkish?


回答1:


Obviously text in your bottom navigation is iso-8859-9 encoded while those in right side navigation are utf-8 encoded. Convert the text in your bottom nav to utf-8 encoding using an editor that allows encoding conversions (like EmEditor) and always use charset=utf-8 as your content type which is the more universal, more flexible and widely supported encoding.




回答2:


You have a mixture of encodings in your document text, but the browser assumes that the whole document uses a single encoding. (In this case, either iso-8859-9 or utf-8 -- whichever you tell it.)

The problem lies with the text, not the content-type. Make the encoding of all the text match the encoding you specify. It is possible that your html editor is not encoding-aware. Maybe using a different editor might help. If your page is dynamically generated from (say) text in a database, you must ensure that that text is correctly encoded when inserted into your template.



来源:https://stackoverflow.com/questions/6889001/turkish-characters-problem

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