Darwin Libc在宽角色方面的行为是什么?

发布于 2025-01-28 07:37:46 字数 1021 浏览 3 评论 0 原文

注意:我已经在AskDivent上问了这个问题,并且作为关闭主题而被关闭。

我正在考虑编写C程序(或者是程序生成器),该程序需要处理Unicode文本。仅处理UTF-8就足够了,但是处理其他编码也很不错。为此,我需要知道宽字符的C库API如何工作。为了进行比较,这是GNU库的那些API的写作非常好的说明:

https://www.gnu.org/software/libc/manual/manual/html_node/ususe-wide-char-classes.html

and

特别是,GNU库选择在Unicode代码点和 WCHAR_TCHAR_T. 值,但这显然不是唯一可能的选择。我该如何确定达尔文图书馆在这些方面做什么?是否有与我引用的GNU手册相当范围的文件?

更一般而言,是否有GNU信息或HTML手册之类的东西,但是涵盖了Darwin Libc?我意识到,大多数正常用途都将被POSIX和相关标准所涵盖,但是当然,这些用途会留下很多开放的问题,例如上述问题。

Note: I have asked this on AskDifferent, and it was closed as off topic.

I am thinking of writing a C program (or rather, a program generator) which will need to process Unicode text. It will be sufficient to process just UTF-8, but it would be nice to handle other encodings as well. In order to do this I need to know how the C library API for wide characters works. For comparison, here is a very well written and detailed explanation of those APIs for the GNU library:

https://www.gnu.org/software/libc/manual/html_node/Using-Wide-Char-Classes.html

and

https://www.gnu.org/software/libc/manual/html_node/Extended-Char-Intro.html

and

https://www.gnu.org/software/libc/manual/html_node/Streams-and-I18N.html

In particular, the GNU library chooses to have a 1-1 mapping between Unicode code points and wchar_t values, but this is clearly not the only possible choice. How can I determine what the Darwin library does in these respects? Is there a document of comparable scope to the GNU manual I quoted?

More generally, is there anything like the GNU Info or HTML manuals for the glibc, but covering the Darwin libc? I realize that most normal use will be covered by POSIX and related standards, but of course those leave a lot of things open, such as the issues mentioned above.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文