Show HN: Mojibake – a low-level Unicode library written in C
4 hours ago
- #text-processing
- #Unicode
- #C-library
- Mojibake is a low-level Unicode 17 text-processing library written in C11/C++17, released under MIT License.
- It offers easy integration with two files (mojibake.c, mojibake.h) and features like normalization, character counting, and NFKC casefolding.
- Key functionalities include text transformation (normalization, case conversion, filtering), text analysis (character database, segmentation, bidirectional text, emoji, display width), sorting/collation, and security (confusable detection, identifier validation).
- Integration supports multiple encodings (UTF-8, UTF-16, UTF-32), C/C++/WASM/TypeScript APIs, custom allocators, build-time feature flags for size reduction, and comprehensive testing/fuzzing.
- The library includes a CLI tool for command-line usage and is designed to be small, fast, self-contained, and compatible across modern operating systems.