Q How to display Unicode strings
A
If the program defines _ Unicode macro, directly use
Wchar * STR = l "unicodestring ";
Textout (0, 0, STR );
Otherwise, the conversion type is required.
# Include
Wchar * STR = l "unicodestring ";
Bstr_t str1 =
What is ANSI and what is Unicode? In fact, this is the two different coding standards, ANSI characters in 8bit, and Unicode characters in 16bit. (for characters that say ANSI holds English characters in single-byte, double-byte for Chinese, and
NSI, UTF-8, Unicode, three encoded formats for character codes, one character can be encoded into ANSI, UTF-8, or Unicode format, and the three formats are only different in expression and represent the same content.
ANSI, UTF-8, Unicode
ANSI, UTF-
Q How to display Unicode strings
A
If the program defines _ Unicode macro, directly use
Wchar * STR = l "unicodestring ";
Textout (0, 0, STR );
Otherwise, the conversion type is required.
# Include
Wchar * STR = l "unicodestring ";
Bstr_t str1 =
Summary of Unicode, ANSI character set, and related string operations Q How to display Unicode stringsAIf the program defines _ Unicode macro, directly useWchar * STR = l "unicodestring ";Textout (0, 0, STR );Otherwise, the conversion type is
q Unicode string display A If the Program defines the _ Unicode macro, use it directly BR> wchar * STR = l "unicodestring "; textout (, STR); otherwise, the conversion type # include
wchar * STR = l "unicodestring";
bstr_t str1
1. Review of three types of codes
ANSI string we are most familiar with, English occupies one byte, Chinese characters 2 bytes, ending with a \ 0, commonly used in TXT text files.Unicode string. Each character (Chinese character or English letter)
Using today's time, we studied the differences between ANSI and Unicode, and then wrote down my findings for future reference.
The most common application of ANSI encoding is in the Notepad program in Windows, when creating a Notepad, the default
Since I started programming, I have been familiar with coding and have never mastered the essence. For example, what is the relationship between ansi and gbk? What is the relationship between gbk and gb2312? What is the difference between ansi and
Following the story of the previous episode, the multi-character set (ANSI) and Unicode and string processing methodsWe have some special requirements:
Sometimes our string is of the Multi-character type, but we need to use the wide character type;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.