Coding of acquaintance:
The computer file storage, data storage, as well as some of the data sent out, what to send data stored content over a network? It is the underlying binary code. Correspondence between binary and text: Codebook
-
ASCII: the first codebook (8)
只包含英文字母,数字,特殊字符,一共不超过128个, 8bit = 1byte, 一个字符占1byte(字节)=8个二进制码
gbk: China's codebook (8,16)
包含英文字母,数字,特殊字符,中文。国家标准。一个英文字母和符号=1byte,一个中文用两个字节,能表示65536个中文字。
Unicode: Unicode (32)
把世界上所有的文字都记到这个密码本。起初一个字符用2个字节(byte)表示,后面为了涵盖所有文字用4个字节32位二进制表示,但是浪费空间。
Utf-8(8,16,32)
Unicde升级而来 英文: 1byte = 8位二进制 欧洲: 2byte = 16位进制 中,亚洲: 3byte = 24位二进制
8bit = 1byte 1024byte = 1kB 1024kb = 1MB 1024MB = 1GB 1023GB = 1TB