gpt4 book ai didi

所有语言的 MySQL 排序规则

转载 作者:IT老高 更新时间:2023-10-28 23:52:49 24 4
gpt4 key购买 nike

我目前正在开发一个网站,该网站将展示世界上几乎所有语言的内容。我在选择要在 MySQL 中定义的最佳排序规则时遇到问题。

哪个是最好的支持所有字符?还是最准确的?

还是最好将所有字符都转换为 unicode?

最佳答案

接受的答案是错误的(也许在 2009 年是正确的)。

utf8mb4_unicode_ci 是用于广泛语言支持的最佳编码。

推理和支持证据:

You want to use utf8mb4 rather than utf8 because the latter only supports 3 byte characters, and you want to support 4 byte characters. (ref)

You want to use unicode rather than general because the latter never sorted correctly. (ref)

关于所有语言的 MySQL 排序规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1450841/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com