当前位置:网站首页>Blood cases caused by < meta charset=UTF-8> -- Analysis of common character codes
Blood cases caused by < meta charset=UTF-8> -- Analysis of common character codes
2022-07-29 04:03:00 【Boiled water】
<meta charset="UTF-8"> What does that mean? ?
I'm looking for an internship recently , Time is limited , In the future, we must write down the underlying principles clearly
First, explain the meaning of this code :
<meta charset="UTF-8">
meta Label head Sub tags in
Set Web page file Display time Character set used
List of common character codes
Code name | explain | remarks |
ASCII | 1、ASCII Encode each letter or symbol in 1byte(8bits), also 8bits The highest place is zero 0, therefore ASCII The only letters and symbols that can be coded are 128 individual . There are some coding handles 8bits The highest bit is 1 After 128 Values are also encoded , bring 1byte Can be said 256 It's worth , But this is extended ASCII, Not standard ASCII. Generally speaking, the standard ASCII Only the front 128 It's worth . 2、ASCII The code is compatible with almost all the codes in the world (UTF16 and UTF32 The exception is ), So if the contents of a text document are all composed of ASCII The letters or symbols inside make up , No matter how you show the content of the document , There can be no garbled code . 3、 Half angle -> A byte ( english )->ASCII-> The compiler knows | |
Unicode | unicode | 1、 International standard character set , It defines a unique code for each character in various languages in the world , To meet cross language needs 、 Cross platform text information conversion . 2、UTF8 The way to solve the separation between characters is that the highest bit in the number binary is continuous 1 To determine how many bytes this word is encoded .0 The beginning is a single byte , and ASCII Code coincidence , Compatible . |
UTF-8(16/32) | UTF-8 It is one of the most widely used Unicode Of Realization way | take Unicode The abstract code bits of the character set are mapped to 8(16/32) Bit long integers ( Code bit ) A sequence of data storage or transmission . |
GB2312 | 1、GB Full name GuoBiao National standard ,GBK Full name GuoBiaoKuozhan National standard extension .GB18030 Encoding compatibility GBK,GBK compatible GB2312, These three codes have a very deep origin . 2、 The earliest national standard for simplified Chinese character coding , Double byte encoding is adopted , Included 7445 Graphic characters , These include 6763 The Chinese characters . 3、GB2312: Full angle -> Two bytes -> The compiler doesn't know | |
BIG5 | Taiwan Traditional Chinese standard character set , Double byte encoding is adopted , Collects 13053 Chinese characters | |
GBK | It's right GB2312 Expansion of coding , On Chinese characters Double byte encoding is adopted .GBK The character set contains 21003 The Chinese characters , Including national standards GB13000-1 All the Chinese, Japanese and Korean characters in , and BIG5 All Chinese characters in the code . | |
GB18030 code | It's right GBK Expansion of coding , Cover Chinese 、 Japanese 、 Korean and Chinese minority languages , It includes 27484 The Chinese characters .GB18030 Character set Use single byte 、 Characters are encoded in three ways: double byte and four byte . compatible GBK and GB2312 Character set |
surface 1 Common character coding table
Compatibility column
chart 1 A list of common character encoding compatibility
In the picture we can see that ,ASCII Compatible with all codes , and The most common UTF8 And GBK In addition to ASCII There is no intersection outside the part , This is also the most common scenario leading to garbled code in normal business , Use UTF8 Read out GBK Encoded text , You may see all kinds of garbled code . and GB Several codes of series ,GB18030 compatible GBK,GBK Compatible GB2312.
quote :
边栏推荐
- tron OUT_ OF_ ENERGY
- Code ~ hide or disable the status bar and virtual keys
- First knowledge of C language (3)
- Remote desktop connection error
- MySQL Part 3
- CUB_ Visualization of key points in 200 bird dataset
- Shopify卖家:EDM营销就要搭配SaleSmartly,轻松搞定转化率
- Problems encountered in vscode connection SSH
- 请问,在sql client中,执行insert into select from job时,如何单
- 数据挖掘——关联分析基础介绍(上)
猜你喜欢
Three tier architecture of enterprise network
3.解决Pycharm报错Unresolved reference ‘selenium‘ Unresolved reference ‘webdriver‘
Press the missing number of interview question 17.04 | | 260. the number that appears only once (including bit operation knowledge points)
Design of environment detection system based on STM32 and Alibaba cloud
Typescript from getting started to mastering (XXII) namespace namespace (I)
Object array merges elements according to a field
EMD 经验模态分解
STM32F103ZET6程序移植为C8T6+C8T6下载程序flash timeout的解决方案
UCOS task switching process
Alibaba Font Icon Library Usage and update methods
随机推荐
SQL window function
HCIP BGP
力扣面试题17.04 消失的数字||260.只出现一次的数字(内含位运算知识点)
MySQL第三篇
[deep learning CPU (part outside) - virtual memory]
MySQL Part 4 (end)
关于ALV格式控制部分的写法
Batch production and upload sales NFT opensea eth polygon
Ssl== certificate related concepts
CUB_ Visualization of key points in 200 bird dataset
安装ros的laser_scan_matche库所遇到的问题(一)
Pointer constant and constant pointer
Wechat applet monitors sliding events on the screen
flink-sql 如何设置 sql执行超时时间
Flask framework operation database_ Add, delete, modify and query statements
UCOS任务切换过程
Several cases of word wrapping in div
Configmap configuration and secret encryption
伏英娜:元宇宙就是新一代互联网!
Typescript from introduction to proficiency (XXIV) using import syntax