I edit PHP and HTML files using FileZilla and Notepad ++. Cyrillic in the editor is displayed normally, but when I open files in the browser, glitches begin.

For example, the word “Reserve” after downloading the document to the server when viewed in a browser looks like this: “Backup” .

When I download a file to a PC and open it with a simple notepad, the word is displayed the same way as in the browser. When I replace the hieroglyph with a normal letter P (in a simple notepad), and reload the file, everything is displayed normally in the browser.

Maybe someone came across this? Is there any solution?

    1 answer 1

    In Noterpad ++, open your file and set the encoding to UTF-8 (without BOM)

    • and if I have a website all on windows-1251? Translate all files and database to UTF-8? - arashvg
    • one
      Create a file with the htaccess extension, write the line AddDefaultCharset UTF-8If you need windows-1251, then like this: AddDefaultCharset WINDOWS-1251 - ChromeChrome