gpt4 book ai didi

ascii - 普通文本中最少使用的分隔符 < ASCII 128

转载 作者:行者123 更新时间:2023-12-03 05:25:11 30 4
gpt4 key购买 nike

由于编码原因可能会让您感到恐惧(我不好意思说),我需要在单个字符串中存储多个文本项。

我将使用一个字符来分隔它们。

哪个字符最适合用于此目的,即哪个字符最不可能出现在文本中?必须是可打印的,并且可能小于 ASCII 的 128,以避免区域设置问题。

最佳答案

我会选择“单位分隔符”ASCII 代码“US”:ASCII 31 (0x1F)

在过去,大多数事情都是串行完成的,没有随机访问。这意味着一些控制代码被嵌入到 ASCII 中。

ASCII 28 (0x1C) File Separator - Used to indicate separation between files on a data input stream.
ASCII 29 (0x1D) Group Separator - Used to indicate separation between tables on a data input stream (called groups back then).
ASCII 30 (0x1E) Record Separator - Used to indicate separation between records within a table (within a group). These roughly map to a tuple in modern nomenclature.
ASCII 31 (0x1F) Unit Separator - Used to indicate separation between units within a record. The roughly map to fields in modern nomenclature.

单位分隔符采用 ASCII 格式,并且有 Unicode 支持显示它(通常是同一字形中的“us”),但许多字体不显示它。

如果您必须显示它,我建议在将其解析为字段后在应用程序中显示它。

关于ascii - 普通文本中最少使用的分隔符 < ASCII 128,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/492090/

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