Many C-language reference books have not been involved in this problem. There are many English variables and English strings. Of course, storage Chinese characters should use characters, this is certain, key issues are Chinese characters in your computer system. How do you have a few bytes? You know the size with this statement:
Printf ("% d", strlen ("size"))); // Enter the size of 2 Chinese characters
However, the size of Chinese characters in each system is different, and fortunate is the same size in most systems. But I have to pay attention to the half-corner and full-corner of Chinese characters. Oh, then I use a simple example to illustrate the input and output of Chinese characters: #include
INT main () {char A [3]; cin >> a; cout << a; return 0;}
Enter: Yes Yes: Yes
Another program is to identify Chinese characters to realize a copy
/ * This is the mechanism of Chinese character encoding. For a very English code distinction. In general, when the first byte is 1, the default this byte and one byte are combined to form a Chinese character ~ * / #include