Domanda

In the website of my company, i added search function. You wrote min and max cc of the glass you want, and it filters from database and shows you result. The problem is, in English and Bulgarian(cyrillic), in the result page, characters are ruined. It only happens at that page.

I am using index.php only. And in every page, only content is changing with php. The website is sales.atmar.bg.

I saved all php files UTF-8 without BOM.

I am suspecting of not encoding/decoding may cause the problem but all other pages are made the same way.


20.03.2014

I've decided to change the question. I've searched glasses between 140cc and 170cc.

I am sharing screenshots with 3 browsers. In ie everything is perfect, in ff everything is ruined, in chrome only title is ruined.

Is there something to do about browser accordability?

1:

enter image description here

2:

enter image description here

3:

enter image description here

È stato utile?

Soluzione

In your html code move

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

right after <head> because

Always declare the encoding of your document using a meta element with a charset attribute, or using the http-equiv and content attributes (called a pragma directive). The declaration should fit completely within the first 1024 bytes at the start of the file, so it's best to put it immediately after the opening head tag. source

And the correct way to write meta is

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

Also you should send proper content-type header in index.php before any output:

header("Content-type: text/html; charset=UTF-8");

Actually both solutions work alone, but I am using them together.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top