UTF-8 string length: fix bug
UTF-8 string length: fix bug: a task in smol-software-harbor (Harbor dataset). u8 len() in src/u8.c should count Unicode code points in a UTF-8 string, but it counts something else ( "café" gives 2 instead of 4), so table columns padded with u8 pad() are misaligned. A code point starts at every…
The task
`u8_len()` in `src/u8.c` should count Unicode code points in a UTF-8 string, but it counts something else (`"café"` gives 2 instead of 4), so table columns padded with `u8_pad()` are misaligned. A code point starts at every byte that is not a continuation byte (`10xxxxxx`). Fix it and run `make -B test`.
Part of efederici/smol-software-harbor.