Convert Unicode codepoints (hex) to UTF-8 byte sequences
Find a file
marco 034040e95d
fix: macos build error
gcc pulls in half the world, missed this include..
2026-06-15 10:58:22 +02:00
src fix: macos build error 2026-06-15 10:58:22 +02:00
.gitattributes Initial commit 2026-06-12 14:09:54 +00:00
.gitignore Initial commit 2026-06-12 14:09:54 +00:00
cmake.toml fix: macos build error 2026-06-15 10:58:22 +02:00
CMakeLists.txt fix: macos build error 2026-06-15 10:58:22 +02:00
cmkr.cmake Initial commit 2026-06-12 14:09:54 +00:00
compile_commands.json clean up template code 2026-06-12 16:14:07 +02:00
README.md add readme 2026-06-12 21:45:19 +02:00

Icocon

A simple fontawesome icons into UTF8 bytes

Conversion logic (manual, for reference)

Example: F7C2

Split into hex digits: F, 7, C, 2 Convert each to 4-bit binary (anchors: A-F = 10-15 = 1010-1111):

F = 1111 7 = 0111 C = 1100 2 = 0010

Glue together into one 16-bit string: 1111011111000010 Split into 4/6/6 chunks: 1111-011111-000010

Prepend UTF-8 prefixes for a 3-byte sequence: 1110 + chunk1 → 1110 1111 10 + chunk2 → 10 011111 10 + chunk3 → 10 000010

Convert each 8-bit byte to hex: 11101111 = EF 10011111 = 9F 10000010 = 82

Result: \xef\x9f\x82