A
A
Arthur2014-11-11 00:02:48
PHP
Arthur, 2014-11-11 00:02:48

Question about the database and page encoding. What can be wrong?

In general, I began to remake the php script of the site (ready-made, English), on the Russian rails. Started by translating pages. The essence of the problem is that either the database gives out everything as it should be - in Russian (the name of my site, etc.), but at the same time the pages display rhombuses with questions. Or My site in the tab (site title) is listed as "RG'R№Pi ....." and at the same time the pages are in Russian.
Clarification: base on UTF-8 pages without encoding - 1 option (where pages are not plowed); the base is on UTF-8, but I add Adddefault charces windows-1251 to the .htaccess file (this is where the pages are plowed, but the site title breaks).
Help how to make everything work at the same time.
rghost.ru/59000976 - file

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Artur, 2014-11-11
@arturka_v_10

In general, the answer turned out to be trivial, I put it in .htaccess without the standard encoding (AddDefaultCharset Off), the pages I translated into Russian, drove them into UTF-8 encoding and encoded it (via NotePad ++). Then, uploaded everything to the hosting. Everything works + in forms where Russian flatly refused to be accepted, they helped me decide. UTF-8 encoding has been added to the protect() function.

A
Anatoly, 2014-11-11
@ABasist

And why Windows-1251?. Usually it helped me AddDefaultCharset UTF-8 in .htaccess Or just recoded the php file itself.

R
RJs45, 2014-11-11
@RJs45

What encoding do you save the files in?
If utf-8 is added on the server, the database is in utf-8, then it would be nice to save the files in utf-8 (without BOM).
Also on the page itself in the head of the encoding meta tags do not forget

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question