diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-03-31 10:26:08 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-03-31 10:52:42 +1100 |
commit | 46db53b1596cccdd22cf44dc376e39601f01c29c (patch) | |
tree | 2b287d0229071c7f2dea26e0e2296a6e9b17c192 /lib/util/charset | |
parent | 0e46e09122b43ff237ca45173129813a875767bd (diff) | |
download | samba-46db53b1596cccdd22cf44dc376e39601f01c29c.tar.gz samba-46db53b1596cccdd22cf44dc376e39601f01c29c.tar.bz2 samba-46db53b1596cccdd22cf44dc376e39601f01c29c.zip |
lib/util/charset correct calculation of UTF8 character sizes
Characters between 0x800 0x0FFFF are 3 bytes long.
Andrew Bartlett
Diffstat (limited to 'lib/util/charset')
-rw-r--r-- | lib/util/charset/util_str.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/charset/util_str.c b/lib/util/charset/util_str.c index 30961d068a..ff53b1875e 100644 --- a/lib/util/charset/util_str.c +++ b/lib/util/charset/util_str.c @@ -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; |