TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

In MySQL, never use “utf8”. Use “utf8mb4”

45 点作者 suresh70超过 5 年前

3 条评论

mikl超过 5 年前
MySQL is a great example how extreme commitment to backwards compatibility makes your whole product backwards.<p>It is chock full of bugs and footguns that you can work around and mitigate if you know how to configure it correctly, but most of those improvements are still not the default.<p>And the `utf8` encoding, that does not fully support UTF-8 looks like it’ll stay around forever. ಠ_ಠ<p>As the author of the post says, much better to just use PostgreSQL, will save you a lot of headaches down the road.
评论 #21451830 未加载
评论 #21470250 未加载
评论 #21452591 未加载
donalhunt超过 5 年前
previous discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17310690" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17310690</a><p>additional context (which the OP didn&#x27;t reference):<p><a href="https:&#x2F;&#x2F;mysqlserverteam.com&#x2F;mysql-8-0-when-to-use-utf8mb3-over-utf8mb4&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mysqlserverteam.com&#x2F;mysql-8-0-when-to-use-utf8mb3-ov...</a><p><a href="https:&#x2F;&#x2F;mysqlserverteam.com&#x2F;sushi-beer-an-introduction-of-utf8-support-in-mysql-8-0&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mysqlserverteam.com&#x2F;sushi-beer-an-introduction-of-ut...</a><p><a href="https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;refman&#x2F;5.5&#x2F;en&#x2F;charset-unicode-utf8mb3.html" rel="nofollow">https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;refman&#x2F;5.5&#x2F;en&#x2F;charset-unicode-utf8...</a><p>hint: &quot;Exactly the same set of characters is available in utf8mb3 and ucs2.&quot;
pwinnski超过 5 年前
&quot;Never&quot; seems an odd choice. Until somewhat recently the recommendation would have been the now-deprecated &quot;utf8mb3&quot; for which &quot;utf8&quot; is a synonym.<p>Until the next release, when &quot;utf8&quot; is updated to be a synonym for &quot;utf8mb4&quot;, yes, use &quot;utf8mb4&quot; directly. At the next release, you can use &quot;utf8&quot; again.