当前位置:网站首页>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.
边栏推荐
猜你喜欢
阿里云新增三大高性能计算解决方案,助力生命科学行业快速发展
Live Classroom System 09--Tencent Cloud VOD Management Module (1)
解码2022中国网安强星丨正向建、反向查,华为构建数字化时代的网络安全防线
罗克韦尔AB PLC RSLogix5000中计数器指令使用方法介绍
An article to teach you a quick start and basic explanation of Pytest, be sure to read
shell(文本打印工具awk)
Thread State 详解
Shell编程之条件语句(二)
Shell 编程--Sed
异常的了解
随机推荐
文件IO-缓冲区
RTL8721DM 双频WIFI + 蓝牙5.0 物联网(IoT)应用
异常的了解
字节跳动原来这么容易就能进去...
MySQL高级指令
shell(文本打印工具awk)
美味的佳肴
STL-stack
链表中的节点每k个一组翻转
解码2022中国网安强星丨正向建、反向查,华为构建数字化时代的网络安全防线
String类的常用方法
学会开会|成为有连接感组织的重要技能
c语言之 练习题1 大贤者福尔:魔法数,神奇的等式
STL-stack
链表相加(二)
水果沙拉酱
服务——DHCP原理与配置
一篇文章教你Pytest快速入门和基础讲解,一定要看
Shell编程规范与变量
阿里巴巴、蚂蚁集团推出分布式数据库 OceanBase 4.0,单机部署性能超 MySQL