Do not like ICU? Here is a basic UTF-8 library on C.
Please, see u8.h for more details.
- UTF-8 aware string manipulation functions
- Rune (Unicode character) navigation and comparison
- String searching and length calculation
- Invalid UTF-8 sequence sanitization
- Lightweight and focused on UTF-8 basics
- CMake 3.10 or higher
- C compiler (GCC, Clang, MSVC)
- Conan 2.x package manager
# 1. Create build directory and install dependencies
mkdir build && cd build
conan install .. --build=missing
# 2. Configure with CMake
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
# 3. Build the library and tests
make
# 4. Run tests
./u8_cunit
To clean the build:
rm -rf build
libu8.a
- Static libraryu8_cunit
- Unit test executable
- CUnit - Unit testing framework (managed via Conan)