I uploaded the site to the hosting, and instead of the text I see “ ”. Although on localhost everything was fine. Tell me how to fix this error? Translate each file to UTF-8 ?

    3 answers 3

    Try adding the following line in the .htaccess file:

     AddDefaultCharset cp1251 

    But, of course, it was better to do it right away in Unicode, and it was better to recode it, and add it to the localhost .htaccess

     AddDefaultCharset utf-8 
    • Tried, does not work = ( - oOKomarOo
    • Okay, I went to change the format, Thank you =) - oOKomarOo

    It looks like a dump was poured, from which encoding to which one.

    You can change, again in htaccess.

    In general, it would be good to translate all the files in UTF8 for a long time and the database too!

    • Simply, if I translate problems with encoding into UTF-8, then local error is oOKomarOo
    • So win1251. Initially, you need to do so that it is good, and not to think later that everything is bad and you need to rewrite everything, everything! - Artem
    • So, what should I do, just translate a lot of files :) - oOKomarOo
     <meta http-equiv="content-type" content="text/html; charset=windows-1251"> 

    Just write this tag in <head></head>

    Try other encodings to register:

    • windows-1250
    • windows-1252
    • utf-8
    • I know such a thing, but it does not help - oOKomarOo
    • And saytik possible? - DmitriyM
    • Here pokess.ru - oOKomarOo
    • <link rel = "icon" href = "/ favicon.ico" type = "image / x-icon"> stands in front of the Doctype. That's the problem) He also needs to be in the head - DmitriyM
    • And you also have <meta http-equiv = "Content-Type" content = "text / html; CONTENT =" text / html; Charset = Windows-1251 "/> But you need <meta http-equiv =" content-type "content =" text / html; charset = windows-1251 "/> - DmitriyM