how can I do basic string operations such as strcat, strlen and ... on UTF-8 string with ICU library in C.
I found lots of functions for UTF-16 but not for UFT-8.
how can I do basic string operations such as strcat, strlen and ... on UTF-8 string with ICU library in C.
I found lots of functions for UTF-16 but not for UFT-8.
ICU supplies a set of C macros and functions for working with UTF-8 encoded strings. Start here: http://userguide.icu-project.org/strings/utf-8
You can use regular strcat
and similar functions with UTF-8. As for length, if you mean to count characters you can do mbstowcs(NULL, s, 0)
.