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:
parent
0e46e09122
commit
46db53b159
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user