<?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>Utf-8 on Tony Bai</title><link>https://tonybai.com/tags/utf-8/</link><description>Recent content in Utf-8 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Fri, 17 Oct 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/utf-8/index.xml" rel="self" type="application/rss+xml"/><item><title>收到非 UTF-8 文本怎么办？Go 字符集检测的探索与实践</title><link>https://tonybai.com/2025/10/17/detect-charset-in-go/</link><pubDate>Fri, 17 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/17/detect-charset-in-go/</guid><description>本文永久链接 – https://tonybai.com/2025/10/17/detect-charset-in-go 大家好，我是Tony Bai。 在上一篇关于 Go 语言 string 与 rune 设计哲学的文章发布后，我收到了许多精彩的反馈。其中，一位读者提出了一个极具现实意义的后续问题：“既然 Go 的世界以 UTF-8 为中心，那么当我们从外部系统（如老旧的文件、非标准的 API）...</description></item><item><title>string 与 rune 的设计哲学：为什么Go 程序员很少为“乱码”烦恼？</title><link>https://tonybai.com/2025/10/13/string-and-rune-in-go/</link><pubDate>Mon, 13 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/13/string-and-rune-in-go/</guid><description>本文永久链接 – https://tonybai.com/2025/10/13/string-and-rune-in-go 大家好，我是Tony Bai。 &amp;gt; “为什么我的字符又乱码了？！” 这是一个在软件开发历史上，曾让无数程序员彻夜难眠的哀嚎。处理文本，是编程中最基础的任务之一，但其背后关于编码 (Encoding) 和字符集 (Character Set) 的水，远比看起来要深。正如 Joe...</description></item><item><title>Go的“七宗罪”：一篇“Go依然不够好”如何引爆社区激辩？</title><link>https://tonybai.com/2025/08/25/go-is-still-not-good/</link><pubDate>Mon, 25 Aug 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/08/25/go-is-still-not-good/</guid><description>本文永久链接 – https://tonybai.com/2025/08/25/go-is-still-not-good 大家好，我是Tony Bai。 在技术圈，平静的湖面下往往暗流涌动。对于Go语言社区而言，这股潜藏已久的暗流，被近期的一篇名为《Go is still not good》的博文彻底引爆。作者Thomas Habets，一位自称拥有超过十年Go使用经验的资深开发者，在他的这篇文章...</description></item><item><title>Rob Pike的“抱怨”与Go的“解药”：直面软件膨胀的四大根源</title><link>https://tonybai.com/2025/04/27/rob-pike-on-bloat/</link><pubDate>Sun, 27 Apr 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/04/27/rob-pike-on-bloat/</guid><description>Rob Pike的“抱怨”与Go的“解药”：直面软件膨胀的四大根源 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进阶课FAQ...</description></item><item><title>Go程序员拥抱C语言简明指南</title><link>https://tonybai.com/2022/05/16/the-short-guide-of-embracing-c-lang-for-gopher/</link><pubDate>Mon, 16 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/16/the-short-guide-of-embracing-c-lang-for-gopher/</guid><description>本文永久链接 – https://tonybai.com/2022/05/16/the-short-guide-of-embracing-c-lang-for-gopher 本文是为于航老师的极客时间专栏《深入C语言和程序运行原理》写的加餐文章《Tony Bai：Go程序员拥抱C语言简明指南》，这里分享给大家，尤其是那些想学习C语言的Gopher们。 * * * 你好，我是Tony Bai。 也许...</description></item><item><title>Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱[译]（第二部分）</title><link>https://tonybai.com/2021/03/29/darker-corners-of-go-part2/</link><pubDate>Mon, 29 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/29/darker-corners-of-go-part2/</guid><description>本文翻译自Rytis Bieliunas的文章《Darker Corners of Go》。 第一部分参见[《Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱\[译\]（第一部分）》](https://tonybai.com/2021/03/29/darker-corners-of-go-part1) 7\. 字符串和字节数组 ------------ 1) Go中的字符串 Go字符串的内...</description></item><item><title>Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱[译]（第一部分）</title><link>https://tonybai.com/2021/03/29/darker-corners-of-go-part1/</link><pubDate>Mon, 29 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/29/darker-corners-of-go-part1/</guid><description>本文翻译自Rytis Bieliunas的文章《Darker Corners of Go》。 &amp;gt; 译注：若干年前，Kyle Quest曾发过一篇名为“50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs”的文章，仿效著名的《C Traps and Pitfalls》编写了50条Go语言的陷阱与缺陷，一时在G...</description></item><item><title>关于Go，你可能不注意的7件事</title><link>https://tonybai.com/2015/09/17/7-things-you-may-not-pay-attation-to-in-go/</link><pubDate>Thu, 17 Sep 2015 00:00:00 +0800</pubDate><guid>https://tonybai.com/2015/09/17/7-things-you-may-not-pay-attation-to-in-go/</guid><description>Go以简洁著称，但简洁中不乏值得玩味的小细节。这些小细节不如goroutine、interface和channel那样&amp;#34;高大上&amp;#34;，&amp;#34;屌 丝&amp;#34;得可能不经常被人注意到，但它们却对理解Go语言有着重要的作用。这里想挑出一些和大家一起通过详实的例子来逐一展开和理解。本文内容较为基础，适合初学者，高手可飘过:) **一、源文件字符集****和字符集编码** Go源码文件默认采用Unicode字符集，Unic...</description></item></channel></rss>