Unicode Character Set, used or not?

Source: Internet
Author: User

Author: Zhu Jincan

Source:Http://www.cnblogs.com/clever101

 

UseVCIn the face of Character Set selection during development, I always thinkMFCA sentence inFamous saying: If the ideal does not compromise the reality, the ideal will be dusty. I once thought that perfect software must be used.UnicodeCharacter Set, because it is required to implement a multi-language version. 《WindowsCore programming also lists a bunch of reasons to persuade us to useUnicodeThe biggest benefit of character sets is, of course, the need for software localization. Other advantages are:

LIt is easy to exchange data between different languages.

LEnables you to allocate a single binary that supports all languages. ExeFile orDLLFile.

LImprove applicationsProgramRunning Efficiency

 

In fact, Microsoft is also vigorously promotingUnicodeFor exampleVs 2003StartVCAll items are used by default.UnicodeCharacter Set. But I have never used it in my memory during actual development.UnicodeAll character sets use multi-byte character sets. The reason is that history is taken into account. Imagine that the system is basically based on the underlying module of the previous multi-Byte Character Set and the Open Source library of the Multi-byte character set. Who has the courage to switch itUnicodeHow about re-compiling character sets? Even if you have the courage, the potential uncertain risk is too big. And 《WindowsSome of the reasons listed in core programming are similar to the ideal: the multi-language version of software is more like a distant dream for most software in China.UnicodeThe version runs faster than the multi-byte version. Today, with the rapid development of hardware, it is estimated that the version only exists in theory. This subtle difference is not noticed by users, and it cannot be mentioned as a bottleneck in efficiency.

 

However, we really don't needUnicode? In case we really need to release a multi-language version, then we estimate that we can modify the incompatible part of the character set.CodeOne thought: if it was used in the first placeUnicodeHow nice is the character set! With this in mind, I think what we can do now is the following:

1At the beginning of development, we should evaluate the necessity of developing multilingual versions. If multilingual versions are planned to be launched in the near future, we should make preparations early. For example, the underlying layer does not move and the upper interface layer usesUnicodeCharacter Set, so you only need to change the upper layer to call the underlying interface (that isUnicodeTo the underlying interface ).

 

2.Use multi-byte character sets andUnicodeCharacter Set types and functions (here I am talking aboutWindowsDevelopment in the Environment), such as the use of Character TypesTchar, String usage_ TMacro inclusion. In this way, the next multi-byte ConversionUnicodeThe transformation workload will be much less.

 

References:

1.《WindowsCore programming version 4, original titleProgramming applications for Microsoft Windows fourth editio, AuthorJetfrey Richter, Translator Wang Jianhua and others

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.