From owner-cvs-all@FreeBSD.ORG Thu Nov 6 02:19:43 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 3B33016A4CE; Thu, 6 Nov 2003 02:19:43 -0800 (PST) Received: from smtp01.syd.iprimus.net.au (smtp01.syd.iprimus.net.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 075BA43FF2; Thu, 6 Nov 2003 02:19:42 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from robbins.dropbear.id.au (210.50.203.152) by smtp01.syd.iprimus.net.au (7.0.020) id 3F8B009E0092F570; Thu, 6 Nov 2003 21:19:41 +1100 Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id 23E8A6100; Thu, 6 Nov 2003 21:19:40 +1100 (EST) Date: Thu, 6 Nov 2003 21:19:40 +1100 From: Tim Robbins To: David Xu Message-ID: <20031106101939.GA5735@wombat.robbins.dropbear.id.au> References: <200311052252.hA5Mqpkd052553@repoman.freebsd.org> <20031106094214.GA5455@wombat.robbins.dropbear.id.au> <3FAA1B7D.3070307@viatech.com.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FAA1B7D.3070307@viatech.com.cn> 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/usr.bin/mklocale yacc.y src/lib/libc/locale Makefile.inc gb2312.c setrunelocale.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: Thu, 06 Nov 2003 10:19:43 -0000 On Thu, Nov 06, 2003 at 05:59:25PM +0800, David Xu wrote: > Tim Robbins wrote: > > >On Wed, Nov 05, 2003 at 02:52:51PM -0800, David Xu wrote: > > > > > > > >>davidxu 2003/11/05 14:52:51 PST > >> > >> FreeBSD src repository > >> > >> Modified files: > >> usr.bin/mklocale yacc.y > >> lib/libc/locale Makefile.inc setrunelocale.c > >> Added files: > >> lib/libc/locale gb2312.c > >> Log: > >> Add gb2312 encoding. > >> > >> > > > >This looks like EUC. Is there any chance you could use the EUC encoding > >code instead of adding another one? Also, out of curiosity, how is it > >different from zh_CN.eucCN? > > > > > >Tim > > > > > > > I hear euc does not check error sequence which is not encoded by GB2312 > , right ? > Despite that, most program ported from Linux only support GB2312 or GBK > , but not > euc, I always has trouble with euc when running some Linux programs. Right. Apple solved this in Darwin by calling isrune() on the wide character before returning it from mbrtowc(). I'm considering doing the same thing in FreeBSD, but I'm not sure whether it would break any applications that relied on the old behaviour. If I did that, would it be possible to use the EUC encoding code? Tim