当前位置:网站首页>ASCII, Unicode and UTF-8
ASCII, Unicode and UTF-8
2022-08-10 22:31:00 【TABE_】
Encoding
Standard ASCII
Standard ASCII, also known as Basic ASCII, uses 7 binary digits (the remaining 1 binary 0 is 0) to represent all uppercase and lowercase letters, the numbers 0 to 9, punctuation, and the alphanumeric characters used in American English.Special control characters.
ASCII code just uses 7-bit binary number, when it is represented by a byte, its first bit is always 0.If only English is represented, one byte is enough, but to represent all the characters in the world, multiple bytes must be used.
Unicode
Unicode is to be able to represent all text on the computer.It sets a unified and unique binary encoding for each character in each language to meet the requirements of cross-language and cross-platform text conversion and processing.It should be noted that Unicode is only a symbol set, it only specifies the binary code of the symbol, but does not specify how the binary code should be stored.
UTF-8
UTF-8 is the most widely used unicode implementation on the Internet.UTF-8 is a variable-length encoding method, which can use 1~4 bytes to represent a symbol, and the byte length varies according to different symbols.
UTF-8 encoding rules:
- For a single-byte character, the first bit is set to 0, and the next 7 bits correspond to the Unicode code point of the character.Therefore, for characters 0 - 127 in English, it is exactly the same as the ASCII code.This means that documents from the ASCII era can be opened with UTF-8 encoding without any problems.
- For a character that needs to be represented by N bytes (N > 1), the first N bits of the first byte are set to 1, the N + 1th bit is set to 0, and the remaining N - 1 wordsThe first two bits of the section are set to 10, and the remaining bits are filled with the character's Unicode code point.
边栏推荐
- 为什么一般公司面试结束后会说「回去等消息」,而不是直接告诉面试者结果?
- JVM经典五十问,这下面试稳了
- 12 Recurrent Neural Network RNN2 of Deep Learning
- 边缘与云计算:哪种解决方案更适合您的连接设备?
- What is Jmeter? What are the principle steps used by Jmeter?
- geemap的详细安装步骤及环境配置
- An article to teach you a quick start and basic explanation of Pytest, be sure to read
- What would happen if disconnecting during the process of TCP connection?
- 自组织是管理者和成员的双向奔赴
- [Maui official version] Create a cross-platform Maui program, as well as the implementation and demonstration of dependency injection and MVVM two-way binding
猜你喜欢
QT笔记——vs + qt 创建一个带界面的 dll 和 调用带界面的dll
shell (text printing tool awk)
virtual address space
测试4年感觉和1、2年时没什么不同?这和应届生有什么区别?
BM7 链表中环的入口结点
HighTec shortcut keys (Keys) setting location
云服务器基于 SSH 协议实现免密登录
谁是边缘计算服务的采购者?是这六个关键角色
配电网络扩展规划:考虑使用概率性能源生产和消费概况的决策(Matlab代码实现)
How to translate financial annual report, why choose a professional translation company?
随机推荐
Shell编程规范与变量
亲测有效|处理风控数据特征缺失的一种方法
Addition of linked lists (2)
新一代网络安全防护体系的五个关键特征
【Maui正式版】创建可跨平台的Maui程序,以及有关依赖注入、MVVM双向绑定的实现和演示
Translating scientific and technological papers, how to translate from Russian to Chinese
Nodes in the linked list are flipped in groups of k
Power system power flow calculation (Newton-Raphson method, Gauss-Seidel method, fast decoupling method) (Matlab code implementation)
链表相加(二)
H3C S5130 IRF做堆叠
LeetCode-402 - Remove K digits
MySQL高级指令
ASCII、Unicode和UTF-8
QT笔记——用VS + qt 生成dll 和 调用生成的dll
mmpose关键点(一):评价指标(PCK,OKS,mAP)
Shell programming specification and variables
Live Classroom System 08-Tencent Cloud Object Storage and Course Classification Management
华为HCIE云计算之Fusion Access桌面云
水果沙拉酱
Service - DNS forward and reverse domain name resolution service