aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/locale/utf8.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2007-10-15 09:51:30 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2007-10-15 09:51:30 +0000
commit4932c895e7f582bdac09f4398257106f3c8861af (patch)
treeb7da64b5e7d62f25b2fe996113e503c586584bb3 /lib/libc/locale/utf8.c
parent0189c6c54ad796dd1de7a6b8929e557f916bb61d (diff)
downloadsrc-4932c895e7f582bdac09f4398257106f3c8861af.tar.gz
src-4932c895e7f582bdac09f4398257106f3c8861af.zip
Add comment explaining __mb_sb_limit trick here.
Notes
Notes: svn path=/head/; revision=172661
Diffstat (limited to 'lib/libc/locale/utf8.c')
-rw-r--r--lib/libc/locale/utf8.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libc/locale/utf8.c b/lib/libc/locale/utf8.c
index 086a1e49d041..0ccadd3e8d3b 100644
--- a/lib/libc/locale/utf8.c
+++ b/lib/libc/locale/utf8.c
@@ -65,6 +65,11 @@ _UTF8_init(_RuneLocale *rl)
__wcsnrtombs = _UTF8_wcsnrtombs;
_CurrentRuneLocale = rl;
__mb_cur_max = 6;
+ /*
+ * UCS-4 encoding used as the internal representation, so
+ * slots 0x0080-0x00FF are occuped and must be excluded
+ * from the single byte ctype by setting the limit.
+ */
__mb_sb_limit = 128;
return (0);