Answer the question
In order to leave comments, you need to log in
Empty text in git and broken encoding in files, how to fix it?
Hey guys!
I am working on a project. Old, from the pre-Covid era, on Bitrix. He has a weird encoding.
In the git, where the text is empty, only punctuation marks and numbers:
In the files it’s like this:
At the same time, the site itself displays ok, but as soon as I upload, let’s say, new text, it immediately turns into heresy:
I even set it in htaccess AddDefaultCharset UTF-8. Files in UTF8 without BOM. Nothing helps.
The only working way is to edit the texts directly through the admin panel on the production site. That's how it works.
I want to work normally with the site, making changes to the repository and not getting a broken encoding at the output. Can anyone come across?
Answer the question
In order to leave comments, you need to log in
The encoding of the files themselves is probably CP1251, and you edit the files using UTF-8, hence the problems.
Set up the CP1251 encoding in a text editor.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question