Advice 1: How to determine the encoding of text file

The encoding of the text in digital documents is called the method of mapping sequences of bytes to characters in the language. There are many different encodings for different languages. To determine the encoding of text file is possible using several software tools.
How to determine the encoding of text file
You will need
  • - Microsoft Office Word;
  • - KWrite;
  • - Mozilla Firefox;
  • - enca.
Instruction
1
Use the editor of Microsoft Office Word if it is installed on the computer to determine the encoding of a text file. To run this application. In the main menu, click "File" and "Open..." or press Ctrl+O. In the open dialog navigate to the desired directory and select the file. Click "Open". If the text encoding is different from CP1251, will automatically open the dialog "Convert file". Activate it in the option "Other" and choose the encoding using the list on the right. When you select the correct encoding in the "Sample" field will be displayed readable text.
2
Apply text editors, allowing for the encoding of the source text. A good example of such an application is KWrite (running KDE on UNIX-like systems). Load the text file into the editor. Then just iterate over the encodings until you see readable text (in KWrite is used for this section of the Encoding Tools menu).
3
Similarly a text editor to determine the file encoding you can use the browser. Use Mozilla Firefox. To run this application. If it is not installed, download the appropriate distribution from the site mozilla.org and install it. Open a browser to the text file. To do this, select in the main menu "File" and "Open file..." or press Ctrl+O. If the loaded text is displayed correctly, expand the "Encoding" of menu "View" and find out the encoding from the name of the item that has the mark. Otherwise choose this option by selecting the various items in the same menu, as well as his section "More".
4
Apply specialized tools to determine the encodings of text files. In UNIX-like systems you can use enca. If necessary install this software using package managers. Print the list of available languages by running the command:

enca --list languages

Determine encoding of a text file, specifying its name with the option -g and the language of the document using the option-L. for Example:

enca -L russian -g /home/vic/tmp/aaa.txt.

Advice 2 : How to know the encoding of the site

On modern web pages is mostly used encoding for Unicode. But some of the resources created long ago and since then never upgraded. Besides, even when viewing a modern website browser can detect the encoding correctly.
How to know the encoding of the site
Instruction
1
Maybe the browser was accidentally disabled auto-detection of encoding. Try to turn it on. To do this, select the menu item "View" - "Encoding" (in older versions of Opera and many other browsers), or "Page" - "Encoding" (in the new versions of Opera). Switch mode, which can be called "Automatically" or "Choose automatically". Maybe the text on the page will immediately become readable.
2
If the page display was not normal, find the correct encoding manually. To do this, go to the same menu item as in the previous case, but instead of the automatic mode select the coding KOI-8R - for sitex, created before the transition to Unicode, it is the most common. If it fails try the same method to choose the encoding CP1251, CP866, and if does not help and it pereproshit all the standards were from the category "Cyrillic".
3
Information about the encoding of the page is typically stored in its source code, and it is on the basis of these data it determines the browser. To read the source code of the page, click on the menu, depending on the browser, select "View" - "Source code" or "Page" - "development Tools" - "Source code". In the beginning of the text locate the following line:meta http-equiv="Content-Type" content="text/html; charset=encodingname" where encodingname - the name of the encoding. Then select in the browser menu this encoding.
4
Standard browser tools powerless, if you use a less common encoding, or the text was subjected to multiple transcoding. To decrypt it, go to online decoder, for example, http://www.artlebedev.ru/tools/decoder/. Place a piece of text from the page in the input box and click "Decrypt". To do this, select the text with the mouse, press Ctrl+C click in the input box and hit Ctrl+V. In the case of success together with the decrypted text you will receive information about what encoding it was.
Is the advice useful?
Search