Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use VS2003 UNICODE characters

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to use VS2003 UNICODE characters. Xiaobian thinks it is quite practical, so share it with you for reference. I hope you can gain something after reading this article.

Here is a brief description of how to set up the VS2003 UNICODE character set:

Add_UNICODE;UNICODE to Preprocessor Definition to the right of C/C++=> Preprocessor in project properties; if MFC project, add wWinMainCRTStartup to Entry Point in Connector => Advanced in project properties

After the above operation, the project uses the UNICODE character set. At this point TCHAR is not the original char type, but wchar_t type,LPCTSTR is also wchar_t* type. (For more information on UNICODE programming questions, see www.vckbase.com/document/viewdoc/? id=642)

Back to original. After explaining the LNK2019 error message in MSDN, it was discovered that MFC projects have the/Zc:wchar_t compilation option set by default. However, this option is not set by default in the Console project. Solution: Select "No" on "Treat wchar_t as a built-in type" in the project property "C/C++"=>"Language." Compile the connection OK after that.

Here is an example code:

Export Function Names in DLL int __declspec(dllexport) FindFile( LPCTSTR lpFileName ); In MFC projects to use the above DLL in the name of the function. (MFC Project is set to UNICODE) FindFile( _T( "FileName" ) );

The work requires a DLL library that uses the UNICODE character set. The application uses MFC libraries and also uses the UNICODE character set. But LNK2019 always happens when compiling connections. There is no such error in the Console project. Rechecked all project properties to see if they are correctly set to use UNICODE character set

There are four VS2003 UNICODE character standardization forms. The most important is Standardized Form C because it is the most common form used in the character model for the World Wide Web. Macromedia provides three other Unicode standardized forms as supplements.

In Unicode, some characters look similar but can be stored in documents in different ways.

For example,"(e diacritical) can be represented as a single character,"e diacritical,"or two characters," normal Latin e"+" compound diacritical." Unicode combination characters are characters used in combination with the previous character, so diacritics appear above "Latin e." Both forms appear as the same typographical style, but each form saved in the file is different.

Standardization is the process of ensuring that all characters that can be saved in different forms are saved in the same form. That is, all "" characters in a document are saved as a single "e diacritic" or "e"+"diacritic," rather than both in a single document.

I specifically noticed that two documents with the same code content use three more bytes of BOM than unused document bytes.

About "VS2003 UNICODE character how to use" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report