reloaded from the http://www.cnblogs.com/sunrack/articles/799707.html
ASCII character table:
extended ASCII character table: < br / > [ After img]http://blog.programfan.com/upfile/200609/20060922113748.gif border="0">
Computer invention, in order to represent characters in a computer, people encode a code called ASCII code. The ASCII code is represented by 7 bits (bit) in a byte, and the range is 0x00 - 0x7F with 128 characters. They think these 128 numbers are enough to indicate these characters of ABCD....ABCD....1234.
cough... English speaking people are stupid. Later, they suddenly discovered that if you need to print these characters in tabular way, there is no "tab". So it expanded the definition of ASCII and used all 8 bits (bit) of a byte to represent the character, which is called extended ASCII code. The range is 0x00 - 0xFF with a total of 256 characters.
cough... The person who speaks Chinese is smart! The Chinese use a continuous extension of 2 extended ASCII codes (0xA0) to represent a Chinese character, the standard of which is called GB-2312. Later, Japanese, Han Wen, Arabic, and Taiwan traditional (BIG-5)... Have used similar methods to extend the definition of the local character set, and now it is called the MBCS character set (multi byte character set). This method is defective, because the character sets defined by each country and region have intersection, so the software that uses GB-2312 can not run in the BIG-5 environment (showing the random code), and vice versa.
... English speaking people have become "smart" at last. In order to unify all the written symbols of the people in the world, the UNICODE standard character set was developed. UNICODE uses 2 bytes to represent a character (unsigned shor int, WCHAR, _wchar_t, OLECHAR). At last, the software in any part of the world can be run in another area without modification. Although I used IE to browse the Japanese website, I showed Japanese characters that I did not know, but at least they were not garbled. The range of UNICODE is 0x0000 - 0xFFFF, which contains more than 60 thousand characters, of which more than 40 thousand are occupied by light Chinese characters. Hei heh heh heh, Chinese people make a big profit: 0)
using a variety of character sets in a program: const char * P =.Quot; Hello.quot; / / / / / / / ASCII character set
const char * P =.Quot;
LPCSTR P =.Quot; Hello, hello.Quot; / / / / meaning
const WCHAR * P = L.quot; Hello, hello; / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / If _MBCS is defined, it means to use MBCS
const TCHAR * P = _T (.Quot; Hello, hello.Quot;);
LPCTSTR P =; Using an intermediate type does not explicitly indicate the use of MBCS, nor does it explicitly indicate the use of UNICODE. What kind of character set do you use in the end? Heh heh... The time to compile. Setting conditions for compiling are: VC6,.Quot; Project\Settings... \C/C card Preprocessor definitions.quot; add or modify _MBCS, _UNICODE; VC.NET,.Quot; project \ attribute \ configuration properties \ regular \ character set.Quot; and then select with a combination window. Using T type is a very good habit, seriously recommended!