<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Gbk on LeafCxy's Blog</title><link>https://leafcxy.github.io/tags/gbk/</link><description>Recent content in Gbk on LeafCxy's Blog</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Thu, 10 Sep 2026 08:00:00 +0800</lastBuildDate><atom:link href="https://leafcxy.github.io/tags/gbk/index.xml" rel="self" type="application/rss+xml"/><item><title>字符编码详解：从乱码到 Unicode 与 UTF-8</title><link>https://leafcxy.github.io/posts/2026/09/character-encoding/</link><pubDate>Thu, 10 Sep 2026 08:00:00 +0800</pubDate><guid>https://leafcxy.github.io/posts/2026/09/character-encoding/</guid><description>&lt;p&gt;你有没有在终端或旧系统里见过这样的&amp;quot;天书&amp;quot;：&lt;code&gt;ä¸­æ–‡&lt;/code&gt;、&lt;code&gt;æ±‰å­—&lt;/code&gt;，或者更魔性的 &lt;code&gt;锟斤拷&lt;/code&gt;？这不是加密，也不是乱敲，而是&lt;strong&gt;字符编码错位&lt;/strong&gt;的产物——同一段字节，用不同的编码规则去解读，就得出完全不同的文字。&lt;/p&gt;
&lt;p&gt;字符编码是计算机最基础也最容易被忽略的知识之一。这篇文章从 ASCII 讲起，一路走到 Unicode 与 UTF-8，把&amp;quot;字符集&amp;quot;和&amp;quot;编码&amp;quot;这两个概念彻底理清楚，最后用代码验证各个编程语言里字符串的真实存储方式。内容参考了 &lt;a href="https://www.hello-algo.com/chapter_data_structure/character_encoding/"&gt;hello-algo 第 3.4 节《字符编码》&lt;/a&gt;。&lt;/p&gt;</description></item></channel></rss>