From owner-freebsd-i18n@FreeBSD.ORG Sun Nov 2 08:42:32 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B28016A4CE; Sun, 2 Nov 2003 08:42:32 -0800 (PST) Received: from mail.ryu16.org (YahooBB219005044050.bbtec.net [219.5.44.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CE0D43F3F; Sun, 2 Nov 2003 08:42:30 -0800 (PST) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id hA2GgSuD003198; Mon, 3 Nov 2003 01:42:28 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id hA2GgIXp003182; Mon, 3 Nov 2003 01:42:18 +0900 (JST) (envelope-from imura) Date: Mon, 3 Nov 2003 01:42:18 +0900 From: "R. Imura" To: fs@freebsd.org, i18n@freebsd.org Message-ID: <20031102164218.GB606%imura@ryu16.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i-ja.1 Subject: [patch] combine mount_udf(8) with kiconv(3) X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Nov 2003 16:42:32 -0000 Hi all, I now added -C option to mount_udf(8) as well as mount_cd9660(8) and mount_ntfs(8) with UDF_ICONV kernel module in order to handle multibyte characters. Since I'm new to nmount(), please correct me if I'm wrong with how to write udf specific options/flags. The patch is here: http://www.ryu16.org/FreeBSD/kiconv/udf_5_current_20031101.diff It is grateful if this will be applied to the FreeBSD src tree. Regards, - R. Imura From owner-freebsd-i18n@FreeBSD.ORG Mon Nov 3 06:57:41 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FFD316A4CF; Mon, 3 Nov 2003 06:57:41 -0800 (PST) Received: from mwinf0804.wanadoo.fr (smtp8.wanadoo.fr [193.252.22.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE83D43F93; Mon, 3 Nov 2003 06:57:39 -0800 (PST) (envelope-from lid@ufrima.imag.fr) Received: from daemonlite (AGrenoble-203-1-8-147.w81-49.abo.wanadoo.fr [81.49.98.147]) by mwinf0804.wanadoo.fr (SMTP Server) with ESMTP id 461151800131; Mon, 3 Nov 2003 15:57:38 +0100 (CET) Message-ID: <00ac01c3a21a$d32bac50$0100a8c0@daemonlite> From: "LI Dong" To: "Murray Stokely" References: <003c01c39dbc$f06fd820$0100a8c0@daemonlite><20031102232841.GC55152@freebsdmall.com> <007601c3a210$17cd8ff0$0100a8c0@daemonlite> Date: Mon, 3 Nov 2003 15:57:38 +0100 Organization: =?iso-8859-1?Q?UFR_IMA=2C_Universit=E9_Joseph_Fourier_-_Grenoble_1?= MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: admin@freebsdchina.org cc: doc@freebsd.org cc: freebsd-i18n@freebsd.org Subject: GB18030 in FreeBSD X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2003 14:57:41 -0000 Hi, I has found zh_CN.GB18030 locale in /src/share/mklocale/, but it is not present in Makefile. Meybe the Makefile is too old? -ld From owner-freebsd-i18n@FreeBSD.ORG Mon Nov 3 07:05:29 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 628D116A4CE; Mon, 3 Nov 2003 07:05:29 -0800 (PST) Received: from mwinf0804.wanadoo.fr (smtp8.wanadoo.fr [193.252.22.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CFB843FB1; Mon, 3 Nov 2003 07:05:28 -0800 (PST) (envelope-from lid@ufrima.imag.fr) Received: from daemonlite (AGrenoble-203-1-8-147.w81-49.abo.wanadoo.fr [81.49.98.147]) by mwinf0804.wanadoo.fr (SMTP Server) with ESMTP id 4E9D318000FE; Mon, 3 Nov 2003 16:05:27 +0100 (CET) Message-ID: <00b401c3a21b$eab987b0$0100a8c0@daemonlite> From: "LI Dong" To: "Murray Stokely" Date: Mon, 3 Nov 2003 16:05:27 +0100 Organization: =?iso-8859-1?Q?UFR_IMA=2C_Universit=E9_Joseph_Fourier_-_Grenoble_1?= MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: admin@freebsdchina.org cc: doc@freebsd.org cc: freebsd-i18n@freebsd.org Subject: Re: GB18030 in FreeBSD X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2003 15:05:29 -0000 Hi, Sorry, there are. I am mistake. I can view them in http://www.freebsd.org/cgi/cvsweb.cgi/src/share/mklocale/ , but I can not fetch them by cvsup (tag=RELENG_4_9 and tag=.). -ld > Hi, > > I has found zh_CN.GB18030 locale in /src/share/mklocale/, but it is not > present in Makefile. Meybe the Makefile is too old? > > -ld > From owner-freebsd-i18n@FreeBSD.ORG Mon Nov 3 08:33:29 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCB4116A4CE; Mon, 3 Nov 2003 08:33:29 -0800 (PST) Received: from mail.ryu16.org (YahooBB219005044050.bbtec.net [219.5.44.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25A0143FD7; Mon, 3 Nov 2003 08:33:28 -0800 (PST) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id hA3GXQwQ056363; Tue, 4 Nov 2003 01:33:26 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id hA3GXQtt056362; Tue, 4 Nov 2003 01:33:26 +0900 (JST) (envelope-from imura) Date: Tue, 4 Nov 2003 01:33:26 +0900 From: "R. Imura" To: LI Dong Message-ID: <20031103163325.GD35761%imura@ryu16.org> References: <00b401c3a21b$eab987b0$0100a8c0@daemonlite> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00b401c3a21b$eab987b0$0100a8c0@daemonlite> User-Agent: Mutt/1.4.1i-ja.1 cc: admin@freebsdchina.org cc: Murray Stokely cc: doc@freebsd.org cc: freebsd-i18n@freebsd.org Subject: Re: GB18030 in FreeBSD X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2003 16:33:30 -0000 Hi, On Mon, Nov 03, 2003 at 04:05:27PM +0100, LI Dong wrote: > Hi, > > Sorry, there are. I am mistake. I can view them in > http://www.freebsd.org/cgi/cvsweb.cgi/src/share/mklocale/ , but I can not > fetch them by cvsup (tag=RELENG_4_9 and tag=.). "tag=." will give you zh_CN.GB18030, but "tag=RELENG_4_9" won't because it's not MFC'ed yet. Only -current has zh_CN.GB18030. cf. http://www.freebsd.org/cgi/cvsweb.cgi/src/share/mklocale/?only_with_tag=RELENG_4_9 Regards, - R. Imura From owner-freebsd-i18n@FreeBSD.ORG Mon Nov 3 08:47:38 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E13116A4CE; Mon, 3 Nov 2003 08:47:38 -0800 (PST) Received: from gauss.stokely.org (builder.freebsdmall.com [65.86.180.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC2B943FD7; Mon, 3 Nov 2003 08:47:37 -0800 (PST) (envelope-from murray@gauss.stokely.org) Received: from gauss.stokely.org (localhost [127.0.0.1]) by gauss.stokely.org (8.12.10/8.12.9) with ESMTP id hA3GlbYm078109; Mon, 3 Nov 2003 08:47:37 -0800 (PST) (envelope-from murray@gauss.stokely.org) Received: (from murray@localhost) by gauss.stokely.org (8.12.10/8.12.9/Submit) id hA3Glb40078108; Mon, 3 Nov 2003 08:47:37 -0800 (PST) Date: Mon, 3 Nov 2003 08:47:37 -0800 From: Murray Stokely To: "R. Imura" Message-ID: <20031103164737.GD77746@freebsdmall.com> References: <00b401c3a21b$eab987b0$0100a8c0@daemonlite> <20031103163325.GD35761%imura@ryu16.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031103163325.GD35761%imura@ryu16.org> User-Agent: Mutt/1.4.1i X-GPG-Key-ID: 1024D/0E451F7D X-GPG-Key-Fingerprint: E2CA 411D DD44 53FD BB4B 3CB5 B4D7 10A2 0E45 1F7D cc: admin@freebsdchina.org cc: doc@freebsd.org cc: freebsd-i18n@freebsd.org Subject: Re: GB18030 in FreeBSD X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2003 16:47:38 -0000 On Tue, Nov 04, 2003 at 01:33:26AM +0900, R. Imura wrote: > "tag=." will give you zh_CN.GB18030, but "tag=RELENG_4_9" won't > because it's not MFC'ed yet. Only -current has zh_CN.GB18030. I just merged this, so your next CVSup to RELENG_4 should also have zh_CN.GB18030. Our main i18n developer (ache@) doesn't run -STABLE very often, so if there are other things you need MFCed just drop me a note. - Murray From owner-freebsd-i18n@FreeBSD.ORG Mon Nov 3 09:10:32 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4F4A16A4CE; Mon, 3 Nov 2003 09:10:32 -0800 (PST) Received: from mail.ryu16.org (YahooBB219005044050.bbtec.net [219.5.44.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF5FF43FEA; Mon, 3 Nov 2003 09:10:28 -0800 (PST) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id hA3HAQwQ057803; Tue, 4 Nov 2003 02:10:26 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id hA3HAPoj057802; Tue, 4 Nov 2003 02:10:25 +0900 (JST) (envelope-from imura) Date: Tue, 4 Nov 2003 02:10:25 +0900 From: "R. Imura" To: Murray Stokely Message-ID: <20031103171025.GE35761%imura@ryu16.org> References: <00b401c3a21b$eab987b0$0100a8c0@daemonlite> <20031103163325.GD35761%imura@ryu16.org> <20031103164737.GD77746@freebsdmall.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031103164737.GD77746@freebsdmall.com> User-Agent: Mutt/1.4.1i-ja.1 cc: admin@freebsdchina.org cc: doc@freebsd.org cc: freebsd-i18n@freebsd.org Subject: Re: GB18030 in FreeBSD X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2003 17:10:32 -0000 Hi, Murray, On Mon, Nov 03, 2003 at 08:47:37AM -0800, Murray Stokely wrote: > I just merged this, so your next CVSup to RELENG_4 should also have > zh_CN.GB18030. Our main i18n developer (ache@) doesn't run -STABLE > very often, so if there are other things you need MFCed just drop me a > note. I think some other files should be MFC'ed too. http://docs.freebsd.org/cgi/getmsg.cgi?fetch=936297+0+archive/2003/cvs-all/20030803.cvs-all http://docs.freebsd.org/cgi/getmsg.cgi?fetch=793963+0+archive/2003/cvs-all/20030803.cvs-all Regards, - R. Imura From owner-freebsd-i18n@FreeBSD.ORG Mon Nov 3 11:52:14 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D9F0216A4CE; Mon, 3 Nov 2003 11:52:14 -0800 (PST) Received: from mail.ryu16.org (YahooBB219005044050.bbtec.net [219.5.44.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46A7943F85; Mon, 3 Nov 2003 11:52:13 -0800 (PST) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id hA3JqCwQ064177; Tue, 4 Nov 2003 04:52:12 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id hA3JqBRH064176; Tue, 4 Nov 2003 04:52:11 +0900 (JST) (envelope-from imura) Date: Tue, 4 Nov 2003 04:52:11 +0900 From: "R. Imura" To: fs@freebsd.org, i18n@freebsd.org Message-ID: <20031103195211.GA63701%imura@ryu16.org> References: <20031102164218.GB606%imura@ryu16.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031102164218.GB606%imura@ryu16.org> User-Agent: Mutt/1.4.1i-ja.1 Subject: Re: [patch] combine mount_udf(8) with kiconv(3) X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2003 19:52:15 -0000 On Mon, Nov 03, 2003 at 01:42:18AM +0900, R. Imura wrote: > Hi all, > > I now added -C option to mount_udf(8) as well as mount_cd9660(8) > and mount_ntfs(8) with UDF_ICONV kernel module in order to > handle multibyte characters. > Since I'm new to nmount(), please correct me if I'm wrong with > how to write udf specific options/flags. > The patch is here: > > http://www.ryu16.org/FreeBSD/kiconv/udf_5_current_20031101.diff I updated the patch because it lacked exception case when meeting a unicode character which is not in his convertion table. New one is here: http://www.ryu16.org/FreeBSD/kiconv/udf_5_current_20031103.diff The difference between 20031101 version and 20031103 version is following. diff -u -r1.1.2.5 udf_vnops.c --- udf_vnops.c 3 Nov 2003 19:38:28 -0000 1.1.2.5 +++ udf_vnops.c 3 Nov 2003 19:29:35 -0000 @@ -450,9 +450,8 @@ /* * Call the OSTA routines to translate the name from a CS0 dstring to a * 16-bit Unicode String. Hooks need to be placed in here to translate from - * Unicode to the encoding that the kernel/user expects. For now, compact - * the encoding to 8 bits if possible. Return the length of the translated - * string. + * Unicode to the encoding that the kernel/user expects. Return the length + * of the translated string. */ static int udf_transname(char *cs0string, char *destname, int len, struct udf_mnt *udfmp) @@ -481,8 +480,17 @@ } unibuf = unip; unileft = (size_t)unilen * 2; - udf_iconv->conv(udfmp->im_d2l, (const char **)&unibuf, &unileft, - (char **)&destname, &destleft); + while (unileft > 0 && destleft > 0) { + udf_iconv->conv(udfmp->im_d2l, (const char **)&unibuf, + &unileft, (char **)&destname, &destleft); + /* Unconverted character found */ + if (unileft > 0 && destleft > 0) { + *destname++ = '?'; + destleft--; + unibuf += 2; + unileft -= 2; + } + } uma_zfree(udf_zone_trans, unip); *destname = '\0'; destlen = MAXNAMLEN - (int)destleft; - R. Imura From owner-freebsd-i18n@FreeBSD.ORG Tue Nov 4 02:27:00 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06B0616A4CF for ; Tue, 4 Nov 2003 02:27:00 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 93C2743FE5 for ; Tue, 4 Nov 2003 02:26:58 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 81938 invoked by uid 1002); 4 Nov 2003 10:26:58 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 4 Nov 2003 10:26:58 -0000 Message-ID: <3FA77ECC.90309@freebsd.org> Date: Tue, 04 Nov 2003 03:26:20 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "R. Imura" References: <20031102164218.GB606%imura@ryu16.org> <20031103195211.GA63701%imura@ryu16.org> In-Reply-To: <20031103195211.GA63701%imura@ryu16.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: i18n@freebsd.org cc: fs@freebsd.org Subject: Re: [patch] combine mount_udf(8) with kiconv(3) X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2003 10:27:00 -0000 Hi, This looks very good. I have one question, however, Why do you copy transname into unibuf? Is it because of endian problems? If so, feel free to modify the OSTA code to produce the correct format. Doing a second zalloc() and copy for every single filename gets expensive and should be avoided. Scott R. Imura wrote: > On Mon, Nov 03, 2003 at 01:42:18AM +0900, R. Imura wrote: > >>Hi all, >> >>I now added -C option to mount_udf(8) as well as mount_cd9660(8) >>and mount_ntfs(8) with UDF_ICONV kernel module in order to >>handle multibyte characters. >>Since I'm new to nmount(), please correct me if I'm wrong with >>how to write udf specific options/flags. >>The patch is here: >> >> http://www.ryu16.org/FreeBSD/kiconv/udf_5_current_20031101.diff > > > I updated the patch because it lacked exception case when > meeting a unicode character which is not in his convertion table. > New one is here: > > http://www.ryu16.org/FreeBSD/kiconv/udf_5_current_20031103.diff > > The difference between 20031101 version and 20031103 version is following. > > diff -u -r1.1.2.5 udf_vnops.c > --- udf_vnops.c 3 Nov 2003 19:38:28 -0000 1.1.2.5 > +++ udf_vnops.c 3 Nov 2003 19:29:35 -0000 > @@ -450,9 +450,8 @@ > /* > * Call the OSTA routines to translate the name from a CS0 dstring to a > * 16-bit Unicode String. Hooks need to be placed in here to translate from > - * Unicode to the encoding that the kernel/user expects. For now, compact > - * the encoding to 8 bits if possible. Return the length of the translated > - * string. > + * Unicode to the encoding that the kernel/user expects. Return the length > + * of the translated string. > */ > static int > udf_transname(char *cs0string, char *destname, int len, struct udf_mnt *udfmp) > @@ -481,8 +480,17 @@ > } > unibuf = unip; > unileft = (size_t)unilen * 2; > - udf_iconv->conv(udfmp->im_d2l, (const char **)&unibuf, &unileft, > - (char **)&destname, &destleft); > + while (unileft > 0 && destleft > 0) { > + udf_iconv->conv(udfmp->im_d2l, (const char **)&unibuf, > + &unileft, (char **)&destname, &destleft); > + /* Unconverted character found */ > + if (unileft > 0 && destleft > 0) { > + *destname++ = '?'; > + destleft--; > + unibuf += 2; > + unileft -= 2; > + } > + } > uma_zfree(udf_zone_trans, unip); > *destname = '\0'; > destlen = MAXNAMLEN - (int)destleft; > > - R. Imura > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > From owner-freebsd-i18n@FreeBSD.ORG Tue Nov 4 08:34:08 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8560516A4CF; Tue, 4 Nov 2003 08:34:08 -0800 (PST) Received: from mail.ryu16.org (YahooBB219005044050.bbtec.net [219.5.44.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 009BE43FB1; Tue, 4 Nov 2003 08:34:05 -0800 (PST) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id hA4GY3wQ011246; Wed, 5 Nov 2003 01:34:03 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id hA4GXxhX011229; Wed, 5 Nov 2003 01:33:59 +0900 (JST) (envelope-from imura) Date: Wed, 5 Nov 2003 01:33:59 +0900 From: "R. Imura" To: Scott Long Message-ID: <20031104163359.GA8303%imura@ryu16.org> References: <20031102164218.GB606%imura@ryu16.org> <20031103195211.GA63701%imura@ryu16.org> <3FA77ECC.90309@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FA77ECC.90309@freebsd.org> User-Agent: Mutt/1.4.1i-ja.1 cc: i18n@freebsd.org cc: fs@freebsd.org Subject: Re: [patch] combine mount_udf(8) with kiconv(3) X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2003 16:34:08 -0000 Hi, On Tue, Nov 04, 2003 at 03:26:20AM -0700, Scott Long wrote: > Hi, > > This looks very good. I have one question, however, Why do you > copy transname into unibuf? Is it because of endian problems? > If so, feel free to modify the OSTA code to produce the correct > format. Doing a second zalloc() and copy for every single > filename gets expensive and should be avoided. Ah, yes, you're right. I now modified the OSTA code and add udf_UncompressUnicodeByte() to it. When iconv is available udf_UncompressUnicodeByte() is used, and when not udf_UncompressUnicode() is used. New patch is http://www.ryu16.org/FreeBSD/kiconv/udf_5_current_20031104.diff Difference from previous version's udf_vnops.c is as follows. diff -u -r1.1.2.6 udf_vnops.c --- udf_vnops.c 4 Nov 2003 15:17:48 -0000 1.1.2.6 +++ udf_vnops.c 4 Nov 2003 15:45:41 -0000 @@ -459,42 +459,43 @@ unicode_t *transname; char *unibuf, *unip; int i, unilen = 0, destlen; - size_t unileft, destleft = MAXNAMLEN; - - /* allocate a buffer big enough to hold an 8->16 bit expansion */ - transname = uma_zalloc(udf_zone_trans, M_WAITOK); - - if ((unilen = udf_UncompressUnicode(len, cs0string, transname)) == -1) { - printf("udf: Unicode translation failed\n"); - uma_zfree(udf_zone_trans, transname); - return 0; - } + size_t destleft = MAXNAMLEN; /* Convert 16-bit Unicode to destname */ if (udfmp->im_flags & UDFMNT_KICONV && udf_iconv) { + /* allocate a buffer big enough to hold an 8->16 bit expansion */ unibuf = uma_zalloc(udf_zone_trans, M_WAITOK); unip = unibuf; - for (i = 0; i < unilen ; i++) { - *unibuf++ = (char)(transname[i] >> 8); - *unibuf++ = (char)transname[i]; + if ((unilen = udf_UncompressUnicodeByte(len, cs0string, unibuf)) == -1) { + printf("udf: Unicode translation failed\n"); + uma_zfree(udf_zone_trans, unibuf); + return 0; } - unibuf = unip; - unileft = (size_t)unilen * 2; - while (unileft > 0 && destleft > 0) { + + while (unilen > 0 && destleft > 0) { udf_iconv->conv(udfmp->im_d2l, (const char **)&unibuf, - &unileft, (char **)&destname, &destleft); + (size_t *)&unilen, (char **)&destname, &destleft); /* Unconverted character found */ - if (unileft > 0 && destleft > 0) { + if (unilen > 0 && destleft > 0) { *destname++ = '?'; destleft--; unibuf += 2; - unileft -= 2; + unilen -= 2; } } uma_zfree(udf_zone_trans, unip); *destname = '\0'; destlen = MAXNAMLEN - (int)destleft; } else { + /* allocate a buffer big enough to hold an 8->16 bit expansion */ + transname = uma_zalloc(udf_zone_trans, M_WAITOK); + + if ((unilen = udf_UncompressUnicode(len, cs0string, transname)) == -1) { + printf("udf: Unicode translation failed\n"); + uma_zfree(udf_zone_trans, transname); + return 0; + } + for (i = 0; i < unilen ; i++) { if (transname[i] & 0xff00) { destname[i] = '.'; /* Fudge the 16bit chars */ @@ -502,11 +503,10 @@ destname[i] = transname[i] & 0xff; } } + uma_zfree(udf_zone_trans, transname); destname[unilen] = 0; destlen = unilen; } - - uma_zfree(udf_zone_trans, transname); return (destlen); } - R. Imura From owner-freebsd-i18n@FreeBSD.ORG Tue Nov 4 08:43:21 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6329116A4D2 for ; Tue, 4 Nov 2003 08:43:21 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id CB8E943F93 for ; Tue, 4 Nov 2003 08:43:19 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 95968 invoked by uid 1002); 4 Nov 2003 16:43:19 -0000 Received: from unknown (HELO ?10.4.1.5?) (64.58.1.252) by smtp.mho.net with SMTP; 4 Nov 2003 16:43:19 -0000 Date: Tue, 4 Nov 2003 09:46:24 -0700 (MST) From: Scott Long X-X-Sender: scottl@pooker.samsco.home To: "R. Imura" In-Reply-To: <20031104163359.GA8303%imura@ryu16.org> Message-ID: <20031104094546.I36900@pooker.samsco.home> References: <20031102164218.GB606%imura@ryu16.org> <20031103195211.GA63701%imura@ryu16.org> <3FA77ECC.90309@freebsd.org> <20031104163359.GA8303%imura@ryu16.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: i18n@freebsd.org cc: fs@freebsd.org Subject: Re: [patch] combine mount_udf(8) with kiconv(3) X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2003 16:43:21 -0000 Ok, looks good. Please send me a full diff and I'll commit it. Thanks! Scott On Wed, 5 Nov 2003, R. Imura wrote: > Hi, > > On Tue, Nov 04, 2003 at 03:26:20AM -0700, Scott Long wrote: > > Hi, > > > > This looks very good. I have one question, however, Why do you > > copy transname into unibuf? Is it because of endian problems? > > If so, feel free to modify the OSTA code to produce the correct > > format. Doing a second zalloc() and copy for every single > > filename gets expensive and should be avoided. > > Ah, yes, you're right. I now modified the OSTA code and add > udf_UncompressUnicodeByte() to it. When iconv is available > udf_UncompressUnicodeByte() is used, and when not udf_UncompressUnicode() > is used. New patch is > > http://www.ryu16.org/FreeBSD/kiconv/udf_5_current_20031104.diff > > Difference from previous version's udf_vnops.c is as follows. > > diff -u -r1.1.2.6 udf_vnops.c > --- udf_vnops.c 4 Nov 2003 15:17:48 -0000 1.1.2.6 > +++ udf_vnops.c 4 Nov 2003 15:45:41 -0000 > @@ -459,42 +459,43 @@ > unicode_t *transname; > char *unibuf, *unip; > int i, unilen = 0, destlen; > - size_t unileft, destleft = MAXNAMLEN; > - > - /* allocate a buffer big enough to hold an 8->16 bit expansion */ > - transname = uma_zalloc(udf_zone_trans, M_WAITOK); > - > - if ((unilen = udf_UncompressUnicode(len, cs0string, transname)) == -1) { > - printf("udf: Unicode translation failed\n"); > - uma_zfree(udf_zone_trans, transname); > - return 0; > - } > + size_t destleft = MAXNAMLEN; > > /* Convert 16-bit Unicode to destname */ > if (udfmp->im_flags & UDFMNT_KICONV && udf_iconv) { > + /* allocate a buffer big enough to hold an 8->16 bit expansion */ > unibuf = uma_zalloc(udf_zone_trans, M_WAITOK); > unip = unibuf; > - for (i = 0; i < unilen ; i++) { > - *unibuf++ = (char)(transname[i] >> 8); > - *unibuf++ = (char)transname[i]; > + if ((unilen = udf_UncompressUnicodeByte(len, cs0string, unibuf)) == -1) { > + printf("udf: Unicode translation failed\n"); > + uma_zfree(udf_zone_trans, unibuf); > + return 0; > } > - unibuf = unip; > - unileft = (size_t)unilen * 2; > - while (unileft > 0 && destleft > 0) { > + > + while (unilen > 0 && destleft > 0) { > udf_iconv->conv(udfmp->im_d2l, (const char **)&unibuf, > - &unileft, (char **)&destname, &destleft); > + (size_t *)&unilen, (char **)&destname, &destleft); > /* Unconverted character found */ > - if (unileft > 0 && destleft > 0) { > + if (unilen > 0 && destleft > 0) { > *destname++ = '?'; > destleft--; > unibuf += 2; > - unileft -= 2; > + unilen -= 2; > } > } > uma_zfree(udf_zone_trans, unip); > *destname = '\0'; > destlen = MAXNAMLEN - (int)destleft; > } else { > + /* allocate a buffer big enough to hold an 8->16 bit expansion */ > + transname = uma_zalloc(udf_zone_trans, M_WAITOK); > + > + if ((unilen = udf_UncompressUnicode(len, cs0string, transname)) == -1) { > + printf("udf: Unicode translation failed\n"); > + uma_zfree(udf_zone_trans, transname); > + return 0; > + } > + > for (i = 0; i < unilen ; i++) { > if (transname[i] & 0xff00) { > destname[i] = '.'; /* Fudge the 16bit chars */ > @@ -502,11 +503,10 @@ > destname[i] = transname[i] & 0xff; > } > } > + uma_zfree(udf_zone_trans, transname); > destname[unilen] = 0; > destlen = unilen; > } > - > - uma_zfree(udf_zone_trans, transname); > > return (destlen); > } > > > - R. Imura > > From owner-freebsd-i18n@FreeBSD.ORG Tue Nov 4 08:45:57 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E058316A4CE; Tue, 4 Nov 2003 08:45:57 -0800 (PST) Received: from mail.ryu16.org (YahooBB219005044050.bbtec.net [219.5.44.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC92B43F75; Tue, 4 Nov 2003 08:45:55 -0800 (PST) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id hA4GjtwQ011726; Wed, 5 Nov 2003 01:45:55 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id hA4Gjtgj011725; Wed, 5 Nov 2003 01:45:55 +0900 (JST) (envelope-from imura) Date: Wed, 5 Nov 2003 01:45:55 +0900 From: "R. Imura" To: Scott Long Message-ID: <20031104164554.GB8303%imura@ryu16.org> References: <20031102164218.GB606%imura@ryu16.org> <20031103195211.GA63701%imura@ryu16.org> <3FA77ECC.90309@freebsd.org> <20031104163359.GA8303%imura@ryu16.org> <20031104094546.I36900@pooker.samsco.home> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <20031104094546.I36900@pooker.samsco.home> User-Agent: Mutt/1.4.1i-ja.1 cc: i18n@freebsd.org cc: fs@freebsd.org Subject: Re: [patch] combine mount_udf(8) with kiconv(3) X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2003 16:45:58 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 04, 2003 at 09:46:24AM -0700, Scott Long wrote: > > Ok, looks good. Please send me a full diff and I'll commit it. > > Thanks! I attached the patch for you. Regards, - R. Imura --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="udf_5_current_20031104.diff" Index: sbin/mount_udf/Makefile =================================================================== RCS file: /home/ncvs/src/sbin/mount_udf/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- sbin/mount_udf/Makefile 15 Apr 2002 20:16:48 -0000 1.2 +++ sbin/mount_udf/Makefile 1 Nov 2003 20:50:50 -0000 @@ -3,10 +3,16 @@ PROG= mount_udf SRCS= mount_udf.c getmntopts.c MAN= mount_udf.8 +DPADD= ${LIBKICONV} +LDADD= -lkiconv MOUNT= ${.CURDIR}/../mount CFLAGS+= -I${MOUNT} -I${.CURDIR}/../../sys -Wall .PATH: ${MOUNT} WARNS= 1 + +# Needs to be dynamically linked for optional dlopen() access to +# userland libiconv +NOSHARED?= NO .include Index: sbin/mount_udf/mount_udf.8 =================================================================== RCS file: /home/ncvs/src/sbin/mount_udf/mount_udf.8,v retrieving revision 1.4 diff -u -r1.4 mount_udf.8 --- sbin/mount_udf/mount_udf.8 12 Dec 2002 05:56:36 -0000 1.4 +++ sbin/mount_udf/mount_udf.8 1 Nov 2003 20:39:47 -0000 @@ -36,6 +36,7 @@ .Nm .Op Fl v .Op Fl o Ar options +.Op Fl C Ar charset .Ar special | node .Sh DESCRIPTION The @@ -57,6 +58,10 @@ The following UDF specific options are available: .It Fl v Be verbose about mounting the UDF file system. +.It Fl C Ar charset +Specify local +.Ar charset +to convert Unicode file names. .El .Sh SEE ALSO .Xr cdcontrol 1 , Index: sbin/mount_udf/mount_udf.c =================================================================== RCS file: /home/ncvs/src/sbin/mount_udf/mount_udf.c,v retrieving revision 1.6 diff -u -r1.6 mount_udf.c --- sbin/mount_udf/mount_udf.c 21 Aug 2002 18:11:17 -0000 1.6 +++ sbin/mount_udf/mount_udf.c 2 Nov 2003 00:29:39 -0000 @@ -46,10 +46,15 @@ #include #include +#include #include +#include +#include #include #include +#include + #include #include #include @@ -66,18 +71,21 @@ { NULL, 0, 0, 0 } }; +int set_charset(char **, char **, const char *); void usage(void); int main(int argc, char **argv) { - struct iovec iov[6]; - int ch, mntflags, opts; + struct iovec iov[12]; + int ch, i, mntflags, opts, udf_flags; char *dev, *dir, mntpath[MAXPATHLEN]; + char *cs_disk, *cs_local; int verbose; - mntflags = opts = verbose = 0; - while ((ch = getopt(argc, argv, "o:v")) != -1) + i = mntflags = opts = udf_flags = verbose = 0; + cs_disk = cs_local = NULL; + while ((ch = getopt(argc, argv, "o:vC:")) != -1) switch (ch) { case 'o': getmntopts(optarg, mopts, &mntflags, &opts); @@ -85,6 +93,11 @@ case 'v': verbose++; break; + case 'C': + if (set_charset(&cs_disk, &cs_local, optarg) == -1) + err(EX_OSERR, "udf_iconv"); + udf_flags |= UDFMNT_KICONV; + break; case '?': default: usage(); @@ -110,27 +123,70 @@ */ mntflags |= MNT_RDONLY; - iov[0].iov_base = "fstype"; - iov[0].iov_len = sizeof("fstype"); - iov[1].iov_base = "udf"; - iov[1].iov_len = strlen(iov[1].iov_base) + 1; - iov[2].iov_base = "fspath"; - iov[2].iov_len = sizeof("fspath"); - iov[3].iov_base = mntpath; - iov[3].iov_len = strlen(mntpath) + 1; - iov[4].iov_base = "from"; - iov[4].iov_len = sizeof("from"); - iov[5].iov_base = dev; - iov[5].iov_len = strlen(dev) + 1; - if (nmount(iov, 6, mntflags) < 0) + iov[i].iov_base = "fstype"; + iov[i++].iov_len = sizeof("fstype"); + iov[i].iov_base = "udf"; + iov[i++].iov_len = strlen(iov[1].iov_base) + 1; + iov[i].iov_base = "fspath"; + iov[i++].iov_len = sizeof("fspath"); + iov[i].iov_base = mntpath; + iov[i++].iov_len = strlen(mntpath) + 1; + iov[i].iov_base = "from"; + iov[i++].iov_len = sizeof("from"); + iov[i].iov_base = dev; + iov[i++].iov_len = strlen(dev) + 1; + iov[i].iov_base = "flags"; + iov[i++].iov_len = sizeof("flags"); + iov[i].iov_base = &udf_flags; + iov[i++].iov_len = sizeof(udf_flags); + if (udf_flags & UDFMNT_KICONV) { + iov[i].iov_base = "cs_disk"; + iov[i++].iov_len = sizeof("cs_disk") + 1; + iov[i].iov_base = cs_disk; + iov[i++].iov_len = strlen(cs_disk) + 1; + iov[i].iov_base = "cs_local"; + iov[i++].iov_len = sizeof("cs_local") + 1; + iov[i].iov_base = cs_local; + iov[i++].iov_len = strlen(cs_local) + 1; + } + if (nmount(iov, i, mntflags) < 0) err(1, "%s", dev); exit(0); } +int +set_charset(char **cs_disk, char **cs_local, const char *localcs) +{ + int error; + + if (modfind("udf_iconv") < 0) + if (kldload("udf_iconv") < 0 || modfind("udf_iconv") < 0) { + warnx( "cannot find or load \"udf_iconv\" kernel module"); + return (-1); + } + + if ((*cs_disk = malloc(ICONV_CSNMAXLEN)) == NULL) + return (-1); + if ((*cs_local = malloc(ICONV_CSNMAXLEN)) == NULL) + return (-1); + strncpy(*cs_disk, ENCODING_UNICODE, ICONV_CSNMAXLEN); + strncpy(*cs_local, localcs, ICONV_CSNMAXLEN); + error = kiconv_add_xlat16_cspair(*cs_local, *cs_disk, 0); + if (error) + return (-1); +#if 0 + error = kiconv_add_xlat16_cspair(*cs_disk, *cs_local, 0); + if (error) + return (-1); +#endif + + return (0); +} + void usage(void) { (void)fprintf(stderr, - "usage: mount_udf [-v] [-o options] special node\n"); + "usage: mount_udf [-v] [-o options] [-C charset] special node\n"); exit(EX_USAGE); } Index: sys/conf/NOTES =================================================================== RCS file: /home/ncvs/src/sys/conf/NOTES,v retrieving revision 1.1183 diff -u -r1.1183 NOTES --- sys/conf/NOTES 28 Oct 2003 05:47:39 -0000 1.1183 +++ sys/conf/NOTES 1 Nov 2003 21:11:04 -0000 @@ -796,6 +796,7 @@ options CD9660_ICONV options MSDOSFS_ICONV options NTFS_ICONV +options UDF_ICONV ##################################################################### Index: sys/conf/files =================================================================== RCS file: /home/ncvs/src/sys/conf/files,v retrieving revision 1.841 diff -u -r1.841 files --- sys/conf/files 27 Oct 2003 11:19:08 -0000 1.841 +++ sys/conf/files 1 Nov 2003 21:10:33 -0000 @@ -939,6 +939,7 @@ fs/smbfs/smbfs_vfsops.c optional smbfs fs/smbfs/smbfs_vnops.c optional smbfs fs/specfs/spec_vnops.c standard +fs/udf/udf_iconv.c optional udf_iconv fs/udf/udf_vfsops.c optional udf fs/udf/udf_vnops.c optional udf fs/udf/osta.c optional udf Index: sys/conf/options =================================================================== RCS file: /home/ncvs/src/sys/conf/options,v retrieving revision 1.422 diff -u -r1.422 options --- sys/conf/options 1 Nov 2003 00:18:29 -0000 1.422 +++ sys/conf/options 1 Nov 2003 21:10:48 -0000 @@ -202,6 +202,7 @@ CD9660_ICONV opt_dontuse.h MSDOSFS_ICONV opt_dontuse.h NTFS_ICONV opt_dontuse.h +UDF_ICONV opt_dontuse.h # If you are following the conditions in the copyright, # you can enable soft-updates which will speed up a lot of thigs Index: sys/fs/udf/osta.c =================================================================== RCS file: /home/ncvs/src/sys/fs/udf/osta.c,v retrieving revision 1.2 diff -u -r1.2 osta.c --- sys/fs/udf/osta.c 23 Aug 2002 14:10:55 -0000 1.2 +++ sys/fs/udf/osta.c 4 Nov 2003 16:27:11 -0000 @@ -73,6 +73,51 @@ return(returnValue); } +/* + * Almost same as udf_UncompressUnicode(). The difference is that + * it keeps byte order of unicode string. + */ +int +udf_UncompressUnicodeByte( + int numberOfBytes, /* (Input) number of bytes read from media. */ + byte *UDFCompressed, /* (Input) bytes read from media. */ + byte *unicode) /* (Output) uncompressed unicode characters. */ +{ + unsigned int compID; + int returnValue, unicodeIndex, byteIndex; + + /* Use UDFCompressed to store current byte being read. */ + compID = UDFCompressed[0]; + + /* First check for valid compID. */ + if (compID != 8 && compID != 16) { + returnValue = -1; + } else { + unicodeIndex = 0; + byteIndex = 1; + + /* Loop through all the bytes. */ + while (byteIndex < numberOfBytes) { + if (compID == 16) { + /* Move the first byte to the high bits of the + * unicode char. + */ + unicode[unicodeIndex++] = + UDFCompressed[byteIndex++]; + } else { + unicode[unicodeIndex++] = 0; + } + if (byteIndex < numberOfBytes) { + /*Then the next byte to the low bits. */ + unicode[unicodeIndex++] = + UDFCompressed[byteIndex++]; + } + } + returnValue = unicodeIndex; + } + return(returnValue); +} + /*********************************************************************** * DESCRIPTION: * Takes a string of unicode wide characters and returns an OSTA CS0 Index: sys/fs/udf/osta.h =================================================================== RCS file: /home/ncvs/src/sys/fs/udf/osta.h,v retrieving revision 1.1 diff -u -r1.1 osta.h --- sys/fs/udf/osta.h 14 Apr 2002 16:52:14 -0000 1.1 +++ sys/fs/udf/osta.h 4 Nov 2003 15:49:05 -0000 @@ -21,6 +21,7 @@ typedef unsigned char byte; int udf_UncompressUnicode(int, byte *, unicode_t *); +int udf_UncompressUnicodeByte(int, byte *, byte *); int udf_CompressUnicode(int, int, unicode_t *, byte *); unsigned short udf_cksum(unsigned char *, int); unsigned short udf_unicode_cksum(unsigned short *, int); Index: sys/fs/udf/udf.h =================================================================== RCS file: /home/ncvs/src/sys/fs/udf/udf.h,v retrieving revision 1.5 diff -u -r1.5 udf.h --- sys/fs/udf/udf.h 4 May 2003 07:40:29 -0000 1.5 +++ sys/fs/udf/udf.h 1 Nov 2003 20:40:01 -0000 @@ -58,6 +58,10 @@ int p_sectors; int s_table_entries; struct udf_sparing_table *s_table; + void *im_d2l; /* disk->local iconv handle */ +#if 0 + void *im_l2d; /* local->disk iconv handle */ +#endif }; struct udf_dirstream { Index: sys/fs/udf/udf_iconv.c =================================================================== RCS file: sys/fs/udf/udf_iconv.c diff -N sys/fs/udf/udf_iconv.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sys/fs/udf/udf_iconv.c 1 Nov 2003 23:05:18 -0000 @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2003 Ryuichiro Imura + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +VFS_DECLARE_ICONV(udf); Index: sys/fs/udf/udf_mount.h =================================================================== RCS file: sys/fs/udf/udf_mount.h diff -N sys/fs/udf/udf_mount.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sys/fs/udf/udf_mount.h 1 Nov 2003 20:40:01 -0000 @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 2003 Ryuichiro Imura + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define UDFMNT_KICONV 0x00000001 Index: sys/fs/udf/udf_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/udf/udf_vfsops.c,v retrieving revision 1.15 diff -u -r1.15 udf_vfsops.c --- sys/fs/udf/udf_vfsops.c 7 Aug 2003 15:04:26 -0000 1.15 +++ sys/fs/udf/udf_vfsops.c 1 Nov 2003 21:01:27 -0000 @@ -79,6 +79,7 @@ #include #include #include +#include #include #include #include @@ -90,12 +91,15 @@ #include #include -#include #include +#include +#include MALLOC_DEFINE(M_UDFMOUNT, "UDF mount", "UDF mount structure"); MALLOC_DEFINE(M_UDFFENTRY, "UDF fentry", "UDF file entry structure"); +struct iconv_functions *udf_iconv = NULL; + /* Zones */ uma_zone_t udf_zone_trans = NULL; uma_zone_t udf_zone_node = NULL; @@ -125,6 +129,8 @@ }; VFS_SET(udf_vfsops, udf, VFCF_READONLY); +MODULE_VERSION(udf, 1); + static int udf_mountfs(struct vnode *, struct mount *, struct thread *); static int @@ -183,9 +189,9 @@ struct udf_mnt *imp = 0; struct export_args *export; struct vfsoptlist *opts; - char *fspec; + char *fspec, *cs_disk, *cs_local; size_t size; - int error, len; + int error, len, *udf_flags; opts = mp->mnt_optnew; @@ -246,6 +252,28 @@ } imp = VFSTOUDFFS(mp); + + udf_flags = NULL; + error = vfs_getopt(opts, "flags", (void **)&udf_flags, &len); + if (error || len != sizeof(int)) + return (EINVAL); + imp->im_flags = *udf_flags; + + if (imp->im_flags & UDFMNT_KICONV && udf_iconv) { + cs_disk = NULL; + error = vfs_getopt(opts, "cs_disk", (void **)&cs_disk, &len); + if (!error && cs_disk[len - 1] != '\0') + return (EINVAL); + cs_local = NULL; + error = vfs_getopt(opts, "cs_local", (void **)&cs_local, &len); + if (!error && cs_local[len - 1] != '\0') + return (EINVAL); + udf_iconv->open(cs_local, cs_disk, &imp->im_d2l); +#if 0 + udf_iconv->open(cs_disk, cs_local, &imp->im_l2d); +#endif + } + copystr(fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); udf_statfs(mp, &mp->mnt_stat, td); @@ -326,6 +354,10 @@ udfmp->im_mountp = mp; udfmp->im_dev = devvp->v_rdev; udfmp->im_devvp = devvp; + udfmp->im_d2l = NULL; +#if 0 + udfmp->im_l2d = NULL; +#endif bsize = 2048; /* XXX Should probe the media for it's size */ @@ -470,6 +502,15 @@ if ((error = vflush(mp, 0, flags))) return (error); + + if (udfmp->im_flags & UDFMNT_KICONV && udf_iconv) { + if (udfmp->im_d2l) + udf_iconv->close(udfmp->im_d2l); +#if 0 + if (udfmp->im_l2d) + udf_iconv->close(udfmp->im_l2d); +#endif + } udfmp->im_devvp->v_rdev->si_mountpoint = NULL; error = VOP_CLOSE(udfmp->im_devvp, FREAD, NOCRED, td); Index: sys/fs/udf/udf_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/udf/udf_vnops.c,v retrieving revision 1.31 diff -u -r1.31 udf_vnops.c --- sys/fs/udf/udf_vnops.c 18 Oct 2003 14:10:25 -0000 1.31 +++ sys/fs/udf/udf_vnops.c 4 Nov 2003 15:49:05 -0000 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -48,6 +49,9 @@ #include #include #include +#include + +extern struct iconv_functions *udf_iconv; static int udf_access(struct vop_access_args *); static int udf_getattr(struct vop_getattr_args *); @@ -446,41 +450,65 @@ /* * Call the OSTA routines to translate the name from a CS0 dstring to a * 16-bit Unicode String. Hooks need to be placed in here to translate from - * Unicode to the encoding that the kernel/user expects. For now, compact - * the encoding to 8 bits if possible. Return the length of the translated - * string. - * XXX This horribly pessimizes the 8bit case + * Unicode to the encoding that the kernel/user expects. Return the length + * of the translated string. */ static int -udf_transname(char *cs0string, char *destname, int len) +udf_transname(char *cs0string, char *destname, int len, struct udf_mnt *udfmp) { unicode_t *transname; - int i, unilen = 0; - - /* allocate a buffer big enough to hold an 8->16 bit expansion */ - transname = uma_zalloc(udf_zone_trans, M_WAITOK); + char *unibuf, *unip; + int i, unilen = 0, destlen; + size_t destleft = MAXNAMLEN; + + /* Convert 16-bit Unicode to destname */ + if (udfmp->im_flags & UDFMNT_KICONV && udf_iconv) { + /* allocate a buffer big enough to hold an 8->16 bit expansion */ + unibuf = uma_zalloc(udf_zone_trans, M_WAITOK); + unip = unibuf; + if ((unilen = udf_UncompressUnicodeByte(len, cs0string, unibuf)) == -1) { + printf("udf: Unicode translation failed\n"); + uma_zfree(udf_zone_trans, unibuf); + return 0; + } + + while (unilen > 0 && destleft > 0) { + udf_iconv->conv(udfmp->im_d2l, (const char **)&unibuf, + (size_t *)&unilen, (char **)&destname, &destleft); + /* Unconverted character found */ + if (unilen > 0 && destleft > 0) { + *destname++ = '?'; + destleft--; + unibuf += 2; + unilen -= 2; + } + } + uma_zfree(udf_zone_trans, unip); + *destname = '\0'; + destlen = MAXNAMLEN - (int)destleft; + } else { + /* allocate a buffer big enough to hold an 8->16 bit expansion */ + transname = uma_zalloc(udf_zone_trans, M_WAITOK); - if ((unilen = udf_UncompressUnicode(len, cs0string, transname)) == -1) { - printf("udf: Unicode translation failed\n"); - uma_zfree(udf_zone_trans, transname); - return 0; - } + if ((unilen = udf_UncompressUnicode(len, cs0string, transname)) == -1) { + printf("udf: Unicode translation failed\n"); + uma_zfree(udf_zone_trans, transname); + return 0; + } - /* At this point, the name is in 16-bit Unicode. Compact it down - * to 8-bit - */ - for (i = 0; i < unilen ; i++) { - if (transname[i] & 0xff00) { - destname[i] = '.'; /* Fudge the 16bit chars */ - } else { - destname[i] = transname[i] & 0xff; + for (i = 0; i < unilen ; i++) { + if (transname[i] & 0xff00) { + destname[i] = '.'; /* Fudge the 16bit chars */ + } else { + destname[i] = transname[i] & 0xff; + } } + uma_zfree(udf_zone_trans, transname); + destname[unilen] = 0; + destlen = unilen; } - destname[unilen] = 0; - uma_zfree(udf_zone_trans, transname); - - return unilen; + return (destlen); } /* @@ -489,7 +517,7 @@ * here also. */ static int -udf_cmpname(char *cs0string, char *cmpname, int cs0len, int cmplen) +udf_cmpname(char *cs0string, char *cmpname, int cs0len, int cmplen, struct udf_mnt *udfmp) { char *transname; int error = 0; @@ -497,7 +525,7 @@ /* This is overkill, but not worth creating a new zone */ transname = uma_zalloc(udf_zone_trans, M_WAITOK); - cs0len = udf_transname(cs0string, transname, cs0len); + cs0len = udf_transname(cs0string, transname, cs0len, udfmp); /* Easy check. If they aren't the same length, they aren't equal */ if ((cs0len == 0) || (cs0len != cmplen)) @@ -686,6 +714,7 @@ struct uio *uio; struct dirent dir; struct udf_node *node; + struct udf_mnt *udfmp; struct fileid_desc *fid; struct udf_uiodir uiodir; struct udf_dirstream *ds; @@ -696,6 +725,7 @@ vp = a->a_vp; uio = a->a_uio; node = VTON(vp); + udfmp = node->udfmp; uiodir.eofflag = 1; if (a->a_ncookies != NULL) { @@ -762,7 +792,7 @@ error = udf_uiodir(&uiodir, dir.d_reclen, uio, 2); } else { dir.d_namlen = udf_transname(&fid->data[fid->l_iu], - &dir.d_name[0], fid->l_fi); + &dir.d_name[0], fid->l_fi, udfmp); dir.d_fileno = udf_getid(&fid->icb); dir.d_type = (fid->file_char & UDF_FILE_CHAR_DIR) ? DT_DIR : DT_UNKNOWN; @@ -946,7 +976,7 @@ } } else { if (!(udf_cmpname(&fid->data[fid->l_iu], - nameptr, fid->l_fi, namelen))) { + nameptr, fid->l_fi, namelen, udfmp))) { id = udf_getid(&fid->icb); break; } Index: sys/modules/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/Makefile,v retrieving revision 1.352 diff -u -r1.352 Makefile --- sys/modules/Makefile 24 Oct 2003 15:44:09 -0000 1.352 +++ sys/modules/Makefile 1 Nov 2003 20:40:36 -0000 @@ -137,6 +137,7 @@ ucom \ udbp \ udf \ + udf_iconv \ ufm \ uftdi \ ugen \ Index: sys/modules/udf/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/udf/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- sys/modules/udf/Makefile 28 Apr 2002 06:38:38 -0000 1.2 +++ sys/modules/udf/Makefile 1 Nov 2003 20:42:15 -0000 @@ -6,6 +6,7 @@ SRCS= udf_vfsops.c udf_vnops.c osta.c SRCS+= vnode_if.h +EXPORT_SYMS= udf_iconv NOMAN= CLEANFILES= .depend Index: sys/modules/udf_iconv/Makefile =================================================================== RCS file: sys/modules/udf_iconv/Makefile diff -N sys/modules/udf_iconv/Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sys/modules/udf_iconv/Makefile 1 Nov 2003 20:47:57 -0000 @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../fs/udf +KMOD= udf_iconv +SRCS= udf_iconv.c + +CFLAGS+= -I${.CURDIR}/../../ + +.include Index: sys/sys/iconv.h =================================================================== RCS file: /home/ncvs/src/sys/sys/iconv.h,v retrieving revision 1.6 diff -u -r1.6 iconv.h --- sys/sys/iconv.h 26 Sep 2003 20:26:25 -0000 1.6 +++ sys/sys/iconv.h 1 Nov 2003 20:49:09 -0000 @@ -100,6 +100,7 @@ #else /* !_KERNEL */ #include +#include /* can't avoid that */ #include /* can't avoid that */ #include /* can't avoid that */ --UugvWAfsgieZRqgk-- From owner-freebsd-i18n@FreeBSD.ORG Tue Nov 4 15:53:55 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCA2F16A4CE; Tue, 4 Nov 2003 15:53:55 -0800 (PST) Received: from mail.ryu16.org (YahooBB219005044050.bbtec.net [219.5.44.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2601943FBD; Tue, 4 Nov 2003 15:53:54 -0800 (PST) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id hA4NriwQ028420; Wed, 5 Nov 2003 08:53:44 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id hA4NriFr028419; Wed, 5 Nov 2003 08:53:44 +0900 (JST) (envelope-from imura) Date: Wed, 5 Nov 2003 08:53:43 +0900 From: "R. Imura" To: Scott Long Message-ID: <20031104235343.GC8303%imura@ryu16.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i-ja.1 cc: Dave Hart cc: i18n@freebsd.org cc: fs@freebsd.org Subject: Fw: RE: [patch] combine mount_udf(8) with kiconv(3) X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2003 23:53:56 -0000 Hi, Yes, as Dave pointed, + iov[i++].iov_len = strlen(iov[1].iov_base) + 1; should be + iov[i].iov_len = strlen(iov[i].iov_base) + 1; + i++; Thanks. - R. Imura ----- Forwarded message from Dave Hart ----- Date: Tue, 4 Nov 2003 20:03:15 -0000 From: "Dave Hart" Subject: RE: [patch] combine mount_udf(8) with kiconv(3) To: "R. Imura" I don't know the right protocol or etiquette for patch feedback so I'm sending this to you without cc'ing any lists or individuals, but please share it freely. Here's a snippet of the diff: Index: sbin/mount_udf/mount_udf.c =================================================================== RCS file: /home/ncvs/src/sbin/mount_udf/mount_udf.c,v retrieving revision 1.6 diff -u -r1.6 mount_udf.c --- sbin/mount_udf/mount_udf.c 21 Aug 2002 18:11:17 -0000 1.6 +++ sbin/mount_udf/mount_udf.c 2 Nov 2003 00:29:39 -0000 @@ -46,10 +46,15 @@ #include #include +#include #include +#include +#include #include #include +#include + #include #include #include @@ -66,18 +71,21 @@ { NULL, 0, 0, 0 } }; +int set_charset(char **, char **, const char *); void usage(void); int main(int argc, char **argv) { - struct iovec iov[6]; - int ch, mntflags, opts; + struct iovec iov[12]; + int ch, i, mntflags, opts, udf_flags; char *dev, *dir, mntpath[MAXPATHLEN]; + char *cs_disk, *cs_local; int verbose; - mntflags = opts = verbose = 0; - while ((ch = getopt(argc, argv, "o:v")) != -1) + i = mntflags = opts = udf_flags = verbose = 0; + cs_disk = cs_local = NULL; + while ((ch = getopt(argc, argv, "o:vC:")) != -1) switch (ch) { case 'o': getmntopts(optarg, mopts, &mntflags, &opts); @@ -85,6 +93,11 @@ case 'v': verbose++; break; + case 'C': + if (set_charset(&cs_disk, &cs_local, optarg) == -1) + err(EX_OSERR, "udf_iconv"); + udf_flags |= UDFMNT_KICONV; + break; case '?': default: usage(); @@ -110,27 +123,70 @@ */ mntflags |= MNT_RDONLY; - iov[0].iov_base = "fstype"; - iov[0].iov_len = sizeof("fstype"); - iov[1].iov_base = "udf"; - iov[1].iov_len = strlen(iov[1].iov_base) + 1; - iov[2].iov_base = "fspath"; - iov[2].iov_len = sizeof("fspath"); - iov[3].iov_base = mntpath; - iov[3].iov_len = strlen(mntpath) + 1; - iov[4].iov_base = "from"; - iov[4].iov_len = sizeof("from"); - iov[5].iov_base = dev; - iov[5].iov_len = strlen(dev) + 1; - if (nmount(iov, 6, mntflags) < 0) + iov[i].iov_base = "fstype"; + iov[i++].iov_len = sizeof("fstype"); + iov[i].iov_base = "udf"; + iov[i++].iov_len = strlen(iov[1].iov_base) + 1; + iov[i].iov_base = "fspath"; + iov[i++].iov_len = sizeof("fspath"); + iov[i].iov_base = mntpath; + iov[i++].iov_len = strlen(mntpath) + 1; + iov[i].iov_base = "from"; + iov[i++].iov_len = sizeof("from"); + iov[i].iov_base = dev; + iov[i++].iov_len = strlen(dev) + 1; + iov[i].iov_base = "flags"; + iov[i++].iov_len = sizeof("flags"); + iov[i].iov_base = &udf_flags; + iov[i++].iov_len = sizeof(udf_flags); + if (udf_flags & UDFMNT_KICONV) { + iov[i].iov_base = "cs_disk"; + iov[i++].iov_len = sizeof("cs_disk") + 1; + iov[i].iov_base = cs_disk; + iov[i++].iov_len = strlen(cs_disk) + 1; + iov[i].iov_base = "cs_local"; + iov[i++].iov_len = sizeof("cs_local") + 1; + iov[i].iov_base = cs_local; + iov[i++].iov_len = strlen(cs_local) + 1; + } + if (nmount(iov, i, mntflags) < 0) err(1, "%s", dev); exit(0); } I think + iov[i++].iov_len = strlen(iov[1].iov_base) + 1; should be + iov[i++].iov_len = strlen(iov[i].iov_base) + 1; or perhaps + iov[i].iov_len = strlen(iov[i].iov_base) + 1; + i++; or equivalent. Currently i == 1 for that code, so it should be functionally identical. Cheers, Dave Hart ----- End forwarded message ----- From owner-freebsd-i18n@FreeBSD.ORG Thu Nov 6 05:10:03 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 899BB16A4CE for ; Thu, 6 Nov 2003 05:10:03 -0800 (PST) Received: from mails.tsinghua.edu.cn (mails.tsinghua.edu.cn [166.111.8.16]) by mx1.FreeBSD.org (Postfix) with SMTP id C5ABD43FD7 for ; Thu, 6 Nov 2003 05:10:00 -0800 (PST) (envelope-from luohong99@mails.tsinghua.edu.cn) Received: (eyou send program); Thu, 06 Nov 2003 21:06:14 +0800 Message-ID: <268123973.27171@mails.tsinghua.edu.cn> Received: from 166.111.172.64 by mails.tsinghua.edu.cn with HTTP; Thu, 06 Nov 2003 21:06:13 +0800 X-WebMAIL-MUA: [166.111.172.64] From: "" To: freebsd-i18n@freebsd.org Date: Thu, 06 Nov 2003 21:06:13 +0800 Content-Type: text/plain Subject: we want GB2312 and GBK X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: luohong99@mails.tsinghua.edu.cn List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2003 13:10:03 -0000 Traditionally, FreeBSD just support EUC as the standard locale of chinese language, but in fact we use GB2312 and GBK, even GB18030 in P.R.China, so I think the GB2312 and GBK should be included in the base system in order to support chinease ideally. Of course, if GB18030 could be well supported I think it is better:) Best Regards, bfdream EDA Lab, Circuits and Systems Division, Department of Electronic Engineering, Tsinghua University, Beijing, P.R.China. From owner-freebsd-i18n@FreeBSD.ORG Thu Nov 6 06:56:13 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB72316A4CE for ; Thu, 6 Nov 2003 06:56:13 -0800 (PST) Received: from bjpu.edu.cn (egw.bjpu.edu.cn [202.112.78.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD72D43FF2 for ; Thu, 6 Nov 2003 06:56:09 -0800 (PST) (envelope-from liukang@bjpu.edu.cn) Received: (eyou gateway send program); Thu, 06 Nov 2003 23:01:53 +0800 X-EYOU-ORIGINAL-IP: 61.49.157.66 X-EYOU-ENVELOPE-MAILFROM: liukang@bjpu.edu.cn Received: from unknown (HELO liukangfj2a7ms) (unknown@61.49.157.66) by 202.112.78.77 with ; Thu, 06 Nov 2003 23:01:53 +0800 From: "Kang Liu" To: , Date: Thu, 6 Nov 2003 22:55:54 +0800 Message-ID: <004a01c3a476$1bafad20$0201a8c0@liukangfj2a7ms> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 In-Reply-To: <268124557.26860@bjpu.edu.cn> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal Subject: RE: we want GB2312 and GBK X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2003 14:56:13 -0000 > -----Original Message----- > From: owner-freebsd-i18n@freebsd.org > [mailto:owner-freebsd-i18n@freebsd.org] On Behalf Of > luohong99@mails.tsinghua.edu.cn > Sent: Thursday, November 06, 2003 9:06 PM > To: freebsd-i18n@freebsd.org > Subject: we want GB2312 and GBK > in the base system in order to support chinease ideally. Of > course, if GB18030 > could be well supported > I think it is better:) GB18030 has been add into -current about 3 months ago, MFCed 2 days ago :-)