From c44dc0d6393702c6bcf74f9504921665918da2b9 Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 15 Oct 2007 09:51:30 +0000 Subject: Add comment explaining __mb_sb_limit trick here. --- lib/libc/locale/utf8.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libc/locale/utf8.c b/lib/libc/locale/utf8.c index 086a1e4..0ccadd3 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); -- cgit v1.1