当前位置:网站首页>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
边栏推荐
- 约瑟夫序列 线段树 O(nlogn)
- undefined reference to `Nabo::NearestNeighbourSearch
- [UDS unified diagnosis service] i. diagnosis overview (2) - main diagnosis protocols (K-line and can)
- _findnext 报错
- 三极管原理及特性分析
- ARM常用汇编指令
- TP download folder, compress folder and download
- sqlite3加密版
- Opencv uses genericindex for KNN search
- [untitled]
猜你喜欢
Vscode custom comments
2020 Jiangsu Collegiate Programming Contest-A.Array
Qt 添加QSerialPort类 实现串口操作
VHDL 有限状态机(FSM) 代码示例
C语言实用小技巧合集(持续更新)
FOC 单电阻采样 位置环控制伺服电机
VHDL-任意分频器(50%占空比)
[UDS unified diagnostic service] IV. typical diagnostic service (5) - function / component test function unit (routine function unit 0x31)
HDU-Tunnel Warfare
【UDS统一诊断服务】一、诊断概述(2)— 主要诊断协议(K线和CAN)
随机推荐
[UDS unified diagnostic service] IV. typical diagnostic service (5) - function / component test function unit (routine function unit 0x31)
日志写法(带时间)
基于VGG对五种类别图片的迁移学习
For() loop parameter call order
进程管理命令
Camera calibration: key point method vs direct method
[UDS unified diagnostic service] i. overview of diagnosis (4) - basic concepts and terms
【UDS统一诊断服务】五、诊断应用示例:Flash Bootloader
相机标定:关键点法 vs 直接法
Programmers can also write novels
[UDS unified diagnosis service] i. diagnosis overview (2) - main diagnosis protocols (K-line and can)
CUDA project encountered a series of compilation problems after changing the environment (computer)
在visual stdio中运行qt程序
Jeu de devinettes
[stepping on the pit] MELD in win11 wsl2 cannot be used normally. Problem repair
软件工程中的十三种文档
C语言中volatile的使用
汇编基础代码示例
C语言结构体指定初始化
三极管原理及特性分析