q.undertow
q.undertow

Reputation: 323

What is the behavior of Darwin libc with respect to wide characters?

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.

Upvotes: 1

Views: 159

Answers (0)

Related Questions