Answer the question
In order to leave comments, you need to log in
How to fix encoding in files?
There is a set of html pages. Initially the text was encoded cp1251. Then it was converted to utf8. But they did it badly and I don't know how. When resaving the text, there is a problem with the capital AND - a question mark is displayed instead.
There are suspicions that the encoding is not utf8, but utf16 and, in general, some characters are in a different encoding.
How can I massively resave files with a new encoding or how to fix such things?
Answer the question
In order to leave comments, you need to log in
Usually like this:
there are editors Notepadd ++, Sublime, etc., which have menu items like: "Encoding / open as". Sometimes in the menu, sometimes on the panel at the bottom. Well and accordingly for preservation too.
If the encoding is not clear, then there are online recognizers, for example, Lebedev. Deciphers abracadabra and says what encoding it was in.
There are hopeless (for me at least) files, where everything is already somehow parts. There I decrypt and type again. Or I'm trying to find some previous versions, server backups.
There are no hopeless situations, there is not the right view of solving the problem.
The surest way is to look at what encoding you are offered to work on the site (meta tags in the head).
Then write a line in the .htaccess file
at the very top. Problems are removed as if by hand, if not a hopeless case.
If everything is so bad, you will have to repair all the pages of the site with pens
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question