cvs commit: src/lib/libc/locale big5.c euc.c mskanji.c utf8.c
Tim Robbins
tjr at freebsd.org
Mon Nov 10 21:11:13 PST 2003
On Tue, Nov 11, 2003 at 01:22:54PM +0900, Hye-Shik Chang wrote:
> On Sun, Nov 02, 2003 at 02:09:33AM -0800, Tim J. Robbins wrote:
> > tjr 2003/11/02 02:09:33 PST
> >
> > FreeBSD src repository
> >
> > Modified files:
> > lib/libc/locale big5.c euc.c mskanji.c utf8.c
> > Log:
> > Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implement
> > mbrtowc() and wcrtomb() directly. GB18030, GBK and UTF2 are left
> > unconverted; GB18030 will be done eventually, but GBK and UTF2 may just
> > be removed, as they are subsets of GB18030 and UTF-8 respectively.
> >
> > Revision Changes Path
> > 1.8 +50 -53 src/lib/libc/locale/big5.c
> > 1.12 +68 -82 src/lib/libc/locale/euc.c
> > 1.9 +46 -48 src/lib/libc/locale/mskanji.c
> > 1.3 +69 -71 src/lib/libc/locale/utf8.c
>
> JFYI, I can't input characters in libreadline and GTK+2 on UTF-8 locales
> (ports/misc/utf8locale) after this change. (and they work again when rollback
> it to utf8.c rev 1.2)
>
> I'm tracking it down but I don't know what's the problem exactly yet.
Ugh, sorry. Can you try this patch and let me know whether it fixes it?
--- utf8.c.old Tue Nov 11 16:05:05 2003
+++ utf8.c Tue Nov 11 16:05:19 2003
@@ -143,7 +143,7 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc,
}
if (pwc != NULL)
*pwc = wch;
- return (wch == L'\0' ? 0 : i);
+ return (wch == L'\0' ? 0 : len);
}
size_t
More information about the cvs-src
mailing list