turkish characters problem

2019-08-13 08:05发布

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?

2条回答
Fickle 薄情
2楼-- · 2019-08-13 08:10

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.

查看更多
何必那么认真
3楼-- · 2019-08-13 08:21

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.

查看更多
登录 后发表回答