I had a file in which part of the comments in Russian was displayed normally, part was not recognized:
Then the file had windows-1251 encoding. After I changed the file encoding to UTF-8 , all comments became unreadable:
How to find out what encoding the file should have? Ie, maybe there are some algorithms like:


