ASCII和Unicode

ASCLL 和 Unicode 是两种字符编码方式,表示如何将字符使用二进制存储。(ASCII and Unicode are two character encodings. Basically, they are standards on how to represent difference characters in binary so that they can be written, stored, transmitted, and read in digital media.)
ASCLL 和 Unicode 的主要区别在于字符编码方式编码字符使用的字节数。 ASCII 使用 8 bite 来编码每个字符,而 Unicode 使用可变长度来编码字符。(The main difference between the two is in the way they encode the character and the number of bits that they use for each. ASCII originally used seven bits to encode each character. This was later increased to eight with Extended ASCII to address the apparent inadequacy of the original. In contrast, Unicode uses a variable bit encoding characters where you can choose between 32, 16, and 8-bit encodings.)
Unicode 出现的主要原因之一是越来越多的对 ASCII 的非标准扩展。Unicode几乎消除了这个问题,因为所有字符都是标准化的。(One of the main reasons why create Unicode was the problem arose from the many non-standard extended ASCII programs. Unicode virtually eliminates this problem as all the character code points were standardized.)
Unicode 可以容纳更多字符。目前, Unicode 包含大多数书面语言,且仍有大量剩余空间。所以 Unicode 不会很快被替换。(Another major advantage of Unicode is that at its maximum it can accommodate a huge number of characters. Because of this, Unicode currently contains most written languages and still has room for even more. So Unicode won’t be replaced anytime soon.)
Unicode 兼容 ASCII。(In order to maintain compatibility with the older ASCII, which was already in widespread use at the time,Unicode was designed in such a way that the first eight bits matched that of the most popular ASCII page.)
总结:

  1. ASCII uses an 8-bit encoding while Unicode uses a variable bit encoding.
  2. Unicode is standardized while ASCII isn’t.
  3. Unicode represents most written languages in the world while ASCII does not.
  4. ASCII has its equivalent within Unicode.

UTF-8, UTF-16, UTF-32

UTF(Unicode Transformation Format)表示 Unicode 转换格式。UTF 是将 Unicode 字符集编码为等效二进制的标准家族。UTF 是可变宽度编码,可使用户能够以最小的空间量对字符进行编码的标准化方法。UTF编码标准中有三类:UTF-8, UTF-16, UTF-32。三种编码标准只是用于编码每个字符的最小字节数不同。简单来说,Unicode是一种编码规范,UTF是Unicode编码规范的实际存储方式
如 UTF-8 最小可使用1个字节(8位),UTF-16最小可使用2个字节(16位),UTF-32最小可使用4个字节(32位)。(UTF stands for Unicode Transformation Format. It is a family of standards for encoding the Unicode character set into its equivalent binary value. UTF was developed so that users have a standardized means of encoding the characters with the minimal amount of space. UTF-8,UTF 16 and UTF 32 are only three of the established standards for encoding. They only differ in how many bytes they use to encode each character. Since three are variable width encoding, they can use up to four bytes to encode the data but when it comes to the minimum, UTF-8 only uses 1 byte (8bits) and UTF-16 uses 2 bytes(16bits) and UTF-32 uses 4 bytes(32bits).
注意,UTF-8 兼容 ASCII 编码,而 UTF-16 和 UTF-32 则不兼容 ASCII 编码。(The main advantage of UTF-8 is that it is backwards compatible with ASCII. When encoding a file that uses only ASCII characters with UTF-8, the resulting file would be identical to a file encoded with ASCII. This is not possible when using UTF-16 or UTF-32 as each character would be two or four bytes long.)
UTF-8 是面向字节的格式,因此可用于面向字节网络或文件。而 UTF-16 和 UTF-32 不是面向字节的,需要建立字节顺序才可用于面向字节的网络。(UTF-8 is byte oriented format and therefore has no problems with byte oriented networks or file. UTF-16 and UTF-32, on the other hand, are not byte oriented and need to establish a byte order in order to work with byte oriented networks.
总结:

  1. UTF-8 and UTF-16 and UTF-32 are all used for encoding characters
  2. UTF-8 uses a byte at the minimum in encoding the characters while UTF-16 uses two and UTF-32 uses four
  3. A UTF-8 encoded file tends to be smaller than a UTF-16 or UTF-32 encoded file
  4. UTF-8 is compatible with ASCII while UTF-16 and UTF-32 are incompatible with ASCII
  5. UTF-8 is byte oriented while UTF-16 and UTF-32 is not
  6. UTF-8 is better in recovering from errors compared to UTF-16 and UTF-32

base64

base64是一种数据编码方式,目的是让数据符合传输协议的要求。
在传统的网络传输中,并不能直接传输数据,还需将数据编码成十六进制或二进制,但因有些情况下传输不可见字符不方便。比如一个纯文本协议,二进制中可能会出现被当做控制字符处理的部分。这样引起传输失败。而base64基于ASCII编码规范,则可以解决这个问题。

参考

http://www.differencebetween.net/technology/software-technology/difference-between-unicode-and-ascii/ Difference Between Unicode and ASCII

原创不易,如果本文对您有帮助,欢迎关注我,谢谢 ~_~

ASCII、Unicode、UTF、base64相关推荐

  1. 字符集、字符编码编码总结:ANSI、UNICODE、MBCS、ASCII等等

    目录 一.字符集与字符编码 二.字符集的发展 1. 单字节字符集(SBCS) 2. 多字节字符集(MBCS) 3. 宽字节字符集(Unicode) 三.UTF - Unicode/UCS Transf ...

  2. 一文读懂字符编码(ASCII、ISO 8859、GB系列、Unicode)

    一文读懂字符编码(ASCII.ISO 8859.GB系列.Unicode) 一.字符编码相关组织 1.1 ANSI 美国国家标准学会 1.2 Ecma 国际 1.3 ISO/IEC 1.4 统一码联盟 ...

  3. ASCII、Unicode、UCS-2、UTF-8 等字符编码规则的区别与联系

    目录 一.前言 二.补充(bit & Byte) 三.ASCII(美国信息交换标准代码) 四.各国独立的语言编码 五.Unicode(统一码.万国码) 1. Unicode字符集 2. Uni ...

  4. ASCII、Unicode、GBK、UTF-8之间的关系

    一.ASCII编码 目录 一.ASCII编码 二.GBK编码 三.Unicode编码 四.UTF-8编码 五.Unicode和UTF-8之间的转换 六.Little endian 和 Big endi ...

  5. python中复数的实部和虚部都是浮点数_Python基础:数值(布尔型、整型、长整型、浮点型、复数)...

    一.概述 Python中的 数值类型(Numeric Types)共有5种:布尔型(bool).整型(int).长整型(long).浮点型(float)和复数(complex). 数值类型支持的主要操 ...

  6. chm 转 html 带索引,chm 的项目文件中包含创建 chm 文件所需的HTML文件信息、目录表文件信息、索引文件信息、窗口属 - 试题答案网问答...

    相关题目与解析 Chm的索引文件中包含每个关键词与HTML文件的对应关系,索引文件是必需的.() chm目录表文件包含目录表中()标题与HTML文件的关联关系.A.每个B.二个C.三个D.多个 chm ...

  7. 【转】字符编码笔记:ASCII、Unicode、UTF-8 和 Base64

    1. ASCII码 我们知道,在计算机内部,所有的信息最终都表示为一个二进制的字符串.每一个二进制位(bit)有0和1两种状态,因此八个二进制位就可以组合出256种状态(-128~127),这被称为一 ...

  8. UTF、Unicode、ASCII及中文编码

    一.Unicode缘起 Unicode是一种字符编码规范 . 1.国际标准ASCII编码 先从ASCII说起.ASCII是用来表示英文字符的一种编码规范,每个ASCII字符占用1个字节(8bits)  ...

  9. 字符集ASCII、GBK、UNICODE、UTF在储存字符时的区别

    ASCII编码(American Standard Code for Information Interchange,美国信息互换标准代码),使用127个8进制字节表示英文和半角字符. GBK (Gu ...

  10. 字符集编码详解【ASCII 、GB2312、GBK、GB18030、unicode、UTF-8】(转)

    ASCII字符集编码 ASCII码是7位编码,编码范围是0x00-0x7F.ASCII字符集包括英文字母.阿拉伯数字和标点符号等字符.其中0x00-0x20和0x7F共33个控制字符. 只支持ASCI ...

最新文章

  1. 【工具软件】webstorm配置
  2. 怎么用leangoo做需求管理?(用户故事地图)
  3. C# Task异步编程
  4. 如何升级docker的版本 ?
  5. 小汤学编程之JAVA基础day01——JAVA基本概念、第一个JAVA程序
  6. AndroidStudio_android蓝牙开发总结_连接硬件设备_测量_血压_血糖_握力_心电_等---Android原生开发工作笔记244
  7. js如何将跨域打开的窗口放到最前面_程序员的强迫症-便捷打开常用网站
  8. 即学即会 Serverless | 初识 Serverless 架构
  9. 云南科软信息科技有限公司
  10. Vue.js 学习笔记三,一些基础指令,v-bind,v-on
  11. avformat_open_input 支持的参数
  12. 聚合支付系统如何开发?
  13. 寻址方式(立即寻址、直接寻址、间接寻址、寄存器寻址、寄存器间接寻址)
  14. MyEclipse编辑区设置为黑底
  15. Appium自动化测试(五)——PO模式(一):短信案例
  16. Java-11-访问字符串中字符与字符串长度
  17. 获取加速乐的__jsl_clearance
  18. 《现代密码学》第二章——完善保密加密
  19. 文本挖掘的量化投资应用大起底!
  20. uboot menuconfig详解

热门文章

  1. 怎么判断间隙过渡过盈配合_什么是间隙配合、过盈配合、过渡配合?它们在汽车上有哪些应用?...
  2. 算法导论 高频算法题 数据结构与算法之美
  3. Linux tcp数据分节接收,TCP的建立和终止 图解
  4. 参考文献顺序_科技论文参考文献的著录规则及存在问题
  5. next_permutation()
  6. 最新用python来操作mysql完全解析
  7. pdf 目录导入 macos
  8. 编译原理完整学习笔记(三):词法分析
  9. 【ZOJ 1964】【尺取】Bound Found【暑期 No.3】
  10. 详细介绍各种常见的分布