当前位置:网站首页>Program coding in programming
Program coding in programming
2022-06-10 08:14:00 【Binary star】
ASCII code
ASCII (American Standard Code for Information Interchange): The American Standard Code for information interchange (ASCII) is a computer coding system based on the Latin alphabet , Mainly used to show modern English and other western European languages . It's the most common information exchange standard , And equivalent to international standards ISO/IEC 646.ASCII The first time it was published as a standard type was in 1967 year , The last update was in 1986 year , So far, we have defined 128 Characters .— From baidu baike
ASCII It's the American Standard , So it can not well meet the needs of other countries .
ANSI code
ANSI It's a character code , To make the computer support more languages , Usually use 0x00-0x7f Scope 1 In bytes 1 English characters . Use beyond this range 0x80-0xFFFF Encoding , That is, extended ASCII code .
ANSI Encoding represents English characters with a byte , Two or four bytes for Chinese .
// C Used in language wchar_t Two bytes
wchar_t var = L' Liu ';
Unicode code
In order to solve different countries ANSI Coding conflicts ,Unicode emerge as the times require : If every symbol in the world is given a unique code , Then the confusion will disappear . This is it. Unicode, It's like its name means , It's a code for all the symbols .
But the problem is , English letters that could have been stored in one byte are in Unicode There must be two bytes in it , This creates waste . So is there one that can eliminate garbled code , And avoid wasteful coding ? The answer is UTF-8!
UTF-8
UTF-8(8 Bit ,Universal Character Set/Unicode Transformation Format) Is aimed at Unicode A variable length character encoding of . It can be used to express Unicode Any character in the standard , And the first byte in its encoding is still the same as ASCII Compatible with , Make the original handle ASCII Character software does not need or only needs a few modifications , Can continue to use . therefore , It's gradually becoming email 、 Web pages and other applications that store or transmit text , Preferred encoding .
In computer memory , Unified use Unicode code , When you need to save to a hard disk or need to transfer , Just switch to UTF-8 code . When editing with Notepad , Read from file UTF-8 The characters are converted to Unicode Characters in memory , After editing , Save it with Unicode Convert to UTF-8 Save to file .
边栏推荐
猜你喜欢
随机推荐
The simplest way to merge and sort -- less than 15 lines
数字展厅设计方案的制定要注意这四点
Comment le système d'affaires devrait - il être antivirus?
Filter for formatting date and text length
Leetcode 160 Intersecting linked list (2022.06.09)
嵌入式还有人关注吗?嵌入式测试需要关注哪些问题?
The most comprehensive layer2 research summary in the current technology circle
Savour wallet Developer Recruitment
Image Classification and Retrieval
Swin-Unet最强分割网络
One's deceased father grind adjusts, read this you will understand!
关于发布《深圳市培育发展新材料产业集群行动计划(2022-2025年)》的通知
测试用例设计方法有哪些?
Boxing and UnBoxing
Notice on the issuance of Shenzhen action plan for cultivating and developing software and information service industry clusters (2022-2025)
Global industry analysis report of high purity anhydrous alumina in 2022
Talk about entrepreneurship
二极管、三极管
Huawei machine test question: two sets output numbers within the distance
Research Report on aquatic feed granulator industry - market status analysis and development prospect forecast









![OS Experiment 6 [device management]](/img/13/4080c19edc930ba610e9881559f389.png)