Windows early is the ANSI character set, single-byte, that is, a Chinese (double-byte) text, in the Windows Simplified Chinese version of the display is Chinese, to the Windows Japanese version of the display do not know what is.
Now Windows supports Unicode, but what if it's text other than Unicode? is to allow a default language encoding, which is interpreted using the default language encoding when a string, not Unicode, is encountered.
In the regional and language options can change the default language, in different Windows language version is different, in the Simplified Chinese version, is GBK, in the traditional Chinese version, is BIG5, in the Japanese version is Shift-jis
And notepad ANSI code, is this default encoding, so, a Chinese text, with the ANSI code to save, in the Chinese version of the code is GBK mode save, to the traditional Chinese version, with the BIG5 read, it is all messed up.
Notepad is also not reconciled to this, so it wants to support Unicode, but there is a problem, a binary encoding, how to determine whether it is GBK or BIG5 or utf-16/utf-8? Notepad does this by saving a label at the front of the TXT file,
If Notepad opens a txt and finds this tag, it means Unicode. The label is called BOM, if it is 0xFF 0xFE, is Utf16le, if 0xFE 0xFF is utf16be, if it is 0xEF 0xBB 0xBF, it is UTF-8.
Without these three things, it is ANSI, which is interpreted using the default language encoding of the operating system.
The advantage of Unicode is that it displays correctly regardless of which language version of your TXT is placed on Windows. ANSI encoding is not. (UTF-8 the advantage is in the network environment, compared to save traffic, after all, the network of English data is the most)
About Windows Notepad garbled problem