当前位置:网站首页>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
边栏推荐
猜你喜欢
C语言实用小技巧合集(持续更新)
[UDS unified diagnosis service] IV. typical diagnosis service (1) - diagnosis and communication management function unit
对象的动态建立和释放,赋值和复制
【UDS统一诊断服务】(补充)五、ECU bootloader开发要点详解 (1)
[UDS unified diagnostic service] III. application layer protocol (1)
FOC电机库 定点PID代码分析
CUDA project encountered a series of compilation problems after changing the environment (computer)
[UDS unified diagnosis service] i. diagnosis overview (1) - diagnosis overview
Makefile基础、常用函数及通用Makefile
【UDS统一诊断服务】二、网络层协议(2)— 数据传输规则(单帧与多帧)
随机推荐
cuda工程更换环境(电脑)后遇到的一系列编译问题
Vs can be compiled, but there will be a red underline to indicate the problem of undefined identifiers
CUDA environment installation
[learn] HF net training
PN结、二极管原理详解与应用
Qt 给应用程序加图标
POJ-The Unique MST
[UDS unified diagnostic service] IV. typical diagnostic service (5) - function / component test function unit (routine function unit 0x31)
OpenCV使用 GenericIndex 进行 KNN 搜索
Opencv uses genericindex for KNN search
cv_bridge 与opencv 版本不匹配的解决
逻辑回归原理及代码实现
CUDA project encountered a series of compilation problems after changing the environment (computer)
cartographer_node 编译没问题,但是运行直接挂掉的bug
C语言的浪漫
Matlab calibration board corner detection principle
[UDS unified diagnostic service] II. Network layer protocol (2) - data transmission rules (single frame and multi frame)
对象的动态建立和释放,赋值和复制
Matching between class template with default template argument and template parameter
相机标定:关键点法 vs 直接法