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

查看:87
本文介绍了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定义(少于)2 21 个字符,类似地,它们映射到数字0-2 21 (尽管当前并非所有数字都被分配,有些是保留的).

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-1在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天全站免登陆