所以,我正在从事一个纯 C (ANSI 9899:1999) 项目,并试图弄清楚从哪里开始重新:Unicode、UTF-8 和所有爵士乐。
具体来说,这是一个语言解释器项目,我有两个主要地方需要处理 Unicode:读取源文件(该语言表面上支持 Unicode 标识符等)和“字符串”对象。
我熟悉有关 Unicode、UTF-7/8/16/32 和 UCS-2/4 等等的所有显而易见的基础知识……我主要是在寻找有用的、特定于 C 语言的(即是,请不要使用 C++ 或 C#,这是之前在 SO 上记录的所有内容)关于我在 C 中实现 Unicode 友好的东西的“下一步”的资源。
任何链接、联机帮助页、维基百科文章、示例代码都非常受欢迎。我还将尝试在原始问题的此处维护此类资源的列表,以供以后遇到它的任何人使用。
- 如果您不熟悉 Unicode 以及实际上是什么编码,在考虑任何其他事情之前必须阅读:http://www.joelonsoftware.com/articles/Unicode.html
- UTF-8 主页:http://www.utf-8.com/
man 3 iconv
(以及iconv_open
和iconvctl
)- International Components for Unicode (通过 Geoff Reedy )
-
libbasekit
,其中似乎包括轻型 Unicode 处理工具 - Glib有一些Unicode功能
- 基础 UTF-8 detector功能,由 Christoph
最佳答案
International Components for Unicode提供用于处理 unicode 的可移植 C 库。这是他们为 ICU4C 进行的电梯宣传:
The C and C++ languages and many operating system environments do not provide full support for Unicode and standards-compliant text handling services. Even though some platforms do provide good Unicode text handling services, portable application code can not make use of them. The ICU4C libraries fills in this gap. ICU4C provides an open, flexible, portable foundation for applications to use for their software globalization requirements. ICU4C closely tracks industry standards, including Unicode and CLDR (Common Locale Data Repository).
关于c - 在哪里可以开始使用 C 语言进行 Unicode 友好的编程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2232861/