Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
aflag
· 2y ago · 0 comments
Do the str* functions handle Unicode any better though? I feel like you'd want a different library for that
Comments
[–]
ben_bai
2y ago
that would be wcslcpy(3)
[–]
asveikau
2y ago
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.