Answer the question
In order to leave comments, you need to log in
Why is the html file not being read correctly?
For some reason, an error occurred unexpectedly with reading html files.
I open any html file in the browser (in all) and get the following picture:
Please tell me how to solve the problem.
Answer the question
In order to leave comments, you need to log in
With this code, <meta charset="utf-8">
you tell the browser what encoding to read the file in. But the problem may not be in the browser, but in the file itself.
Are there normal letters in the file itself, if you open it, for example, through Notepad ++? If the question marks or krakozyabry, then you can try to open it in Word. Usually, if Word sees problematic characters, it prompts you to choose an encoding for the file and shows a window where you can "measure" the encoding. I am attaching a screenshot.
I had a similar problem when I opened a file that I didn't create through PHPStorm. Storm is not good at recognizing encodings. I did not notice that Russian letters are displayed as questions and saved the file. I was unable to restore it.
I also had another problem with the file, but not only the Cyrillic alphabet was displayed incorrectly, but the whole text in general, I asked a question on this site, you can read: Is it possible to restore this txt file? . It also failed to restore.
Guys, it was shorter than my cant, I don’t know how, but instead of html, Opacc stood at the bottom right (hell knows what), that’s why the problem with question marks instead of Russian text. I removed the picture to make it clearer. Wasted your time, sorry.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question