当前位置:网站首页>Multibyte and Unicode in VS
Multibyte and Unicode in VS
2022-04-23 06:44:00 【The old man is outside the door】
ANSI( namely MBCS): For multibyte character set , It is the encoding method of indefinite length to represent the world characters .ANSI When it represents English letters, it is the same as ASCII equally , But when representing other words, you need to use multiple bytes ( When processing Chinese characters Use double byte mode ).ANSI Character use 8bit, Can express 256 Characters , Express 26 An English letter is more than enough , But it means Chinese characters , Korean , Japanese and other non Western characters with thousands of characters are certainly not enough .
Unicode: Both English and Chinese characters are represented by double bytes . Like characters ‘A’ stay ASCII The following is represented by a byte , And in the Unicode The following is represented by two bytes , Among them, the high word section uses ‘0’ fill ; Character Chinese character “ you ” stay ASCII The following is represented by two bytes , And in the Unicode The following is also represented by two bytes .Unicode The use of fixed length is to express the world text , According to statistics , Two bytes can encode all existing words without ambiguity .
Windows NT All the character related functions of the provide versions in two ways , and Windows 9x Only support ANSI The way . If the encoding method is ANSI,_T It doesn't work ; If the encoding method is Unicode, The compiler will put " Hello !" With Unicode How to save ._T and _L The difference is that ,_L No matter how you compile , All with Unicode Methods to save .
ANSI:windows In the system ANSI Generally refers to the localized character set and its coding method , It varies according to the system version and relevant language options
unicode Medium utf-8: One byte in English 、 Three bytes of Chinese characters ;
unicode Medium utf-16: Both English and Chinese characters are two bytes ;
Reference resources :
1.https://blog.csdn.net/Aliven888/article/details/109708358
2.https://blog.csdn.net/qq_28437139/article/details/104199308
3.https://blog.csdn.net/SarahZhang0104/article/details/51346999
4.https://www.cnblogs.com/linkstree/p/5677883.html
5.https://www.zhihu.com/question/20650946
版权声明
本文为[The old man is outside the door]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230548038748.html
边栏推荐
- Cross domain issues - allow origin header contains multiple values but only one is allowed
- 软件工程中的十三种文档
- sqlite3加密版
- Generate random number
- Camera calibration: key point method vs direct method
- 深蓝学院激光slam 理论与实践 第三章激光雷达去畸变 作业习题
- Log writing method (with time)
- [untitled]
- 四元数乘法
- Matlab calibration board corner detection principle
猜你喜欢
随机推荐
带默认模板实参的类模板与模板模板形参的匹配
卷积神经网络实现CIFAR100数据集分类
Using printf in MFC
PM2 deploy nuxt related commands
[UDS unified diagnosis service] IV. typical diagnosis service (1) - diagnosis and communication management function unit
TensorFlow张量介绍
[UDS unified diagnosis service] i. diagnosis overview (3) - ISO 15765 architecture
Graduation project, curriculum link, student achievement evaluation system
HDU-Memory Control
Class inheritance and derivation
静态成员
[UDS unified diagnostic service] II. Network layer protocol (1) - overview and functions of network layer
软件工程中的十三种文档
ROS包nmea_navsat_driver读取GPS、北斗定位信息笔记
深蓝学院激光slam 理论与实践 第三章激光雷达去畸变 作业习题
死区时间的分析与设置
Qt 给应用程序加图标
Cross domain issues - allow origin header contains multiple values but only one is allowed
Programmers can also write novels
深蓝学院激光slam理论与实践 -第二章(里程计标定)作业









![[UDS unified diagnosis service] i. diagnosis overview (1) - diagnosis overview](/img/c5/4b3092daeabf0f4889d93fef327c88.png)