Administrator
发布于 2026-05-17 / 7 阅读

阐述:UTF-8编码是如何向下兼容ASCII码的?

https://blog.csdn.net/sandyen/article/details/1108168
编码,utf8
3字节 1110xxxx 10xxxxxx 10xxxxxx
中文:"中"
utf8--> 4e2d -》0100 1110 0010 1101
 b'\xe4\xb8\xad'.decode('utf8') -》中 

与上边组合
1110 0100 10111000 10101101 -》就是 e4b8ad


评论