ASCII 和 Unicode 有什么区别? [英] What's the difference between ASCII and Unicode?

查看:36
本文介绍了ASCII 和 Unicode 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Unicode 和 ASCII 的确切区别是什么?

What's the exact difference between Unicode and ASCII?

ASCII 共有 128 个字符(扩展集中的 256 个字符).

ASCII has a total of 128 characters (256 in the extended set).

Unicode 字符有大小规范吗?

Is there any size specification for Unicode characters?

推荐答案

ASCII 定义了 128 个字符,映射到数字 0–127.Unicode 定义(小于)221 个字符,类似地,这些字符映射到数字 0–221(尽管当前并非所有数字都已分配,有些数字已保留).

ASCII defines 128 characters, which map to the numbers 0–127. Unicode defines (less than) 221 characters, which, similarly, map to numbers 0–221 (though not all numbers are currently assigned, and some are reserved).

Unicode 是 ASCII 的超集,数字 0–127 在 ASCII 中的含义与在 Unicode 中的含义相同.例如,数字 65 的意思是拉丁大写的‘A’".

Unicode is a superset of ASCII, and the numbers 0–127 have the same meaning in ASCII as they have in Unicode. For example, the number 65 means "Latin capital 'A'".

由于 Unicode 字符通常不适合一个 8 位字节,因此有多种以字节序列存储 Unicode 字符的方法,例如 UTF-32 和 UTF-8.

Because Unicode characters don't generally fit into one 8-bit byte, there are numerous ways of storing Unicode characters in byte sequences, such as UTF-32 and UTF-8.

这篇关于ASCII 和 Unicode 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆