mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-28 21:02:56 +08:00
deploy
This commit is contained in:
@ -1939,7 +1939,7 @@
|
||||
|
||||
|
||||
|
||||
<h1 id="34">3.4. 字符集与编码<a class="headerlink" href="#34" title="Permanent link">¶</a></h1>
|
||||
<h1 id="34">3.4. 字符编码 *<a class="headerlink" href="#34" title="Permanent link">¶</a></h1>
|
||||
<p>在计算机中,所有数据都是以二进制数的形式存储的,字符 <code>char</code> 也不例外。为了表示字符,我们需要建立一套「字符集」,规定每个字符和二进制数之间的一一对应关系。有了字符集之后,计算机就可以通过查表完成二进制数到字符的转换。</p>
|
||||
<h2 id="341-ascii">3.4.1. ASCII 字符集<a class="headerlink" href="#341-ascii" title="Permanent link">¶</a></h2>
|
||||
<p>「ASCII 码」是最早出现的字符集,全称为“美国标准信息交换代码”。它使用 7 位二进制数(即一个字节的低 7 位)表示一个字符,最多能够表示 128 个不同的字符。这包括英文字母的大小写、数字 0-9 、一些标点符号,以及一些控制字符(如换行符和制表符)。</p>
|
||||
|
Reference in New Issue
Block a user