Re:I'm Not a Fan of Strlcpy(3)
by aflag on Monday July 15, 2024 @04:17PM
(#40971130)
Do the str* functions handle Unicode any better though? I feel like you'd want a different library for that
[ Parent
| on HN ]
that would be wcslcpy(3)
Nope. Unicode correctness is much more complicated than switching char to wchar_t. Many glyphs take multiple codepoints or multiple character units in either utf-16 or utf-8. You need something like the break iterator "character" separator in ICU.