0

When I save the source of this page of a Russian website:

http://www.mail.ru/

as a .txt file, all Russian letters turn into Chinese characters (I am working on a Chinese computer at the moment), but when I save another page of another Russian website:

http://starling.rinet.ru/cgi-bin/response.cgi?root=/usr/local/share/starling/morpho&morpho=0&basename=\usr\local\share\starling\morpho\ozhegov\ozhegov&first=4001

also as a .txt file, all Russian letters are saved correctly.

Any ideas why this might be happening?

2 Answers 2

2

The webpages you mention use different encodings. The mail.ru page uses Cyrillic Windows-1251, the rinet.ru page uses Unicode UTF-8.

It may be that the mail.ru source is saved exactly as the server sent it, but your text editor didn't detect the encoding or doesn't support it at all. See if your text editor has an Encoding option or menu and try different encodings.

As a test, you can drag and drop the text file into your web browser. If the Russian text doesn't appear correctly, you can try different encodings. Depending on your web browser, you can use something like right-click → Encoding, or page menu → Encoding, or View → Encoding.

This test can help confirm if text editor isn't detecting the encoding, or if the text file's encoding was incorrectly converted when it was saved.

1

As seen in html source these two pages have different encondings: mail.ru is in windows-1251 and second link in in utf-8.

UTF-8 is used all over the world and can be used to encode all possible unicode symbols, so text in utf-8 should be seen on every computer (if it has correct fonts installed).

Windows-1251 is 1-byte encoding, which means that it can be used to encode only 256 symbols (including special symbols, numbers and english alphabet both lowercase and uppercase) and it is used only in post-USSR. There are many 1-byte encodings used over the world and your text editor probably uses some chinese encoding by default (or just identified encoding incorrectly). Maybe it can be changed in its settings or you can convert text from one encoding to other.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .