1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

lib/util/charset correct calculation of UTF8 character sizes

Characters between 0x800 0x0FFFF are 3 bytes long.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2011-03-31 10:26:08 +11:00
parent 0e46e09122
commit 46db53b159

View File

@ -184,7 +184,7 @@ _PUBLIC_ size_t strlen_m_ext(const char *s, charset_t src_charset, charset_t dst
count += 1;
} else if (c < 0x800) {
count += 2;
} else if (c < 0x1000) {
} else if (c < 0x10000) {
count += 3;
} else {
count += 4;