当前位置:网站首页>ASCII, Unicode, and UTF-8
ASCII, Unicode, and UTF-8
2022-06-11 12:42:00 【Xiaobai, a vegetable seller】
This blog refers to :ASCII,Unicode and UTF-8
One 、ASCll code
We all know that a byte has 8 position , Convert to binary , Can be said 256 Number , That is from 00000000 To 11111111.ASCll code It's stipulated that 128 Character encoding , Such as the blank space space yes 32( Binary for 0010000), Capital letters A yes 65. this 128 The symbols also contain 32 A control symbol that can't be printed . It only takes up the space after one byte 7 position , The first one is uniformly defined as 0.
Two 、 Not ASCll code
We know what's ahead 128 Each code is certain , But other countries still have some other letters , I'm going to use theta 128 - 255 To encode , At this point, other coding forms are required .
3、 ... and 、Unicode
If each country uses a different coding form , At this point, there will be the problem of garbled code , Let's say we send an email , Use a coding method at the sender , However, another encoding method is used at the receiver , At this point, there will be the problem of garbled code .Unicode Coding can solve the problem of garbled code ,Unicode Encoding can encode 100w Characters , So it contains characters from all countries .
Four 、Unicode What happened
unicode There are some problems with coding , For example, Chinese characters yan Of unicode Encoded as 4E25, Converting to binary code is enough 15 Bits to save , Of course, for larger characters , You can use three or four bytes to save . How can we distinguish unicode and ascll? Because for a unicode We can think of it as two , Three or four ascll code . How do we distinguish now ? If we encode all the codes according to the maximum number of digits , For ascll The first few bytes of are 0, Waste of resources .
5、 ... and 、UTF-8UTF-8 yes Unicode One of the implementation schemes of , Of course, it's not just this one , for example UTF-16( Characters are represented by two or four bytes ),UTF-32( Characters are represented by four bytes ). Compared with UTF-16 and UTF-32 Come on ,UTF-8 Is a side length encoding method , That is, the range of bytes that can be represented is : One byte to four bytes .UTF-8 Coding standards :1、 about ASCll Encoding uses a byte to represent , And the first is 0, for instance a Of UTF-8 The code of is 01100001.2、 For non ASCll Encoding uses multiple bytes to represent , And first ( Count from left to right ) First few 1, Represents a few bytes , And the remaining bytes are represented by 10 start .
For example : yan Of Unicode yes 4E25(100111000100101),4E25 Three bytes are required to save , So the starting position is 1110xxxx 10xxxxxx 10xxxxxx, Then start from back to front , In turn 100111000100101 Fill in , So the final yan Corresponding UTF-8 The value of is expressed as :11100100 10111000 10100101, Hex is :E4B8A5.
边栏推荐
- node结合art-template 模板引擎 创建模板文件
- What are the elements of running a gymnasium?
- 4K投影儀哪款性價比最高,當貝X3 Pro高亮128G存儲618值得看
- C event bus
- Oracle DatabaseLink 跨数据库连接
- After Oracle deletes a user, it can still use the user to log in
- Jerry's CMD_ SET_ BT_ Name command format [chapter]
- imx6ul开发板移植主线u-boot之EMMC启动流程
- CMD of Jerry's AI protocol_ SET_ BT_ Addr [chapter]
- 记录一次jvm GC过程
猜你喜欢

室内场馆现代化的三大要点

Technical difficulties of secsha

Flick controls window behavior (trigger, remover, allow delay, put late data into side output stream)

How can physical stores break through operational difficulties? Take a look at the store operation guide of this physical store applet

Construction of specflow environment

How does data age in Splunk?

4K投影儀哪款性價比最高,當貝X3 Pro高亮128G存儲618值得看

秒杀多级缓存-----商品详情页

经营养生理疗馆要注意什么问题?

How can mechanical equipment manufacturing enterprises manage outsourcing with the help of ERP system?
随机推荐
9. Parler de threadlocal
Jerry's aicmd_ SET_ BT_ Addr command format [chapter]
Security mechanism of verification code in seckill
1、线程基础知识
Where is it safer to open an account for soda ash futures? How much is the margin for soda ash futures?
4、LockSupport与线程中断
7. CAS
Some common websites
CMD of Jerry's AI protocol_ SET_ BT_ Name [chapter]
What are the profit sources of mother and baby stores?
Redis數據類型日常使用場景
How can mechanical equipment manufacturing enterprises manage outsourcing with the help of ERP system?
How does Wireshark modify the display format of packet capturing time and date?
Kehai Rongsheng & zhenghang will jointly welcome the future of digital intelligence with informatization driven management upgrading
Flip window join, interval join, window cogroup
How to optimize SEO on the mobile terminal? Do you need to optimize GoogleSEO on the mobile terminal for a separate m domain name?
7、CAS
The super document downloading tool scihub CN teaches you to download documents with one line of command
Progress bar loading
美容院管理系统如何解决门店运营的三大难题?