From owner-cvs-all@FreeBSD.ORG Mon Nov 10 21:11:13 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 316EE16A4CE; Mon, 10 Nov 2003 21:11:13 -0800 (PST) Received: from smtp02.syd.iprimus.net.au (smtp02.syd.iprimus.net.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FEF543FAF; Mon, 10 Nov 2003 21:11:11 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from robbins.dropbear.id.au (203.134.131.38) by smtp02.syd.iprimus.net.au (7.0.020) id 3F8F522A00866AE2; Tue, 11 Nov 2003 16:11:09 +1100 Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id 2AD81611E; Tue, 11 Nov 2003 16:11:51 +1100 (EST) Date: Tue, 11 Nov 2003 16:11:50 +1100 From: Tim Robbins To: Hye-Shik Chang Message-ID: <20031111051150.GB59673@wombat.robbins.dropbear.id.au> References: <200311021009.hA2A9XTU063850@repoman.freebsd.org> <20031111042254.GA28372@i18n.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031111042254.GA28372@i18n.org> User-Agent: Mutt/1.4.1i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/locale big5.c euc.c mskanji.c utf8.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2003 05:11:13 -0000 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