Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jan 2002 20:38:45 +0200
From:      Alexey Zelkin <phantom@freebsd.org>
To:        Hiroo Ono <hiroo@oikumene.gcd.org>
Cc:        Hajimu UMEMOTO <ume@mahoroba.org>, Mark Peek <mark@peek.org>, Makoto Matsushita <matusita@jp.FreeBSD.org>, i18n@freebsd.org, stable@freebsd.org
Subject:   zh_CN support in tcsh (was: Re: Fwd: Re: FreeBSD ja_JP.eucJP and ko_KR.eucKR)
Message-ID:  <20020106203845.A64542@ark.cris.net>
In-Reply-To: <86lmfbzcrs.wl@chrysanthe.oikumene.gcd.org>; from hiroo@oikumene.gcd.org on Mon, Jan 07, 2002 at 01:04:39AM %2B0900
References:  <p05101105b85d169481fb@207.76.207.129> <20020106003405.A26410@ark.cris.net> <p05101106b85d3289a939@207.76.207.129> <20020106141149.A20367@ark.cris.net> <ygebsg7zi6e.wl@mille.mahoroba.org> <20020106162002.B35822@ark.cris.net> <ygeadvrzhex.wl@mille.mahoroba.org> <20020106162739.D35822@ark.cris.net> <yge8zbbzgly.wl@mille.mahoroba.org> <86lmfbzcrs.wl@chrysanthe.oikumene.gcd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
hi,

[Cc'ed to -stabel and -i18n to grow chance to find potential testers!]

On Mon, Jan 07, 2002 at 01:04:39AM +0900, Hiroo Ono wrote:

> > phantom> So, zh_CN.{EUC,eucCN} support is required for Chinese users even w/o
> > phantom> nls catalogs ?
> > 
> > Yes, I think it is required for command line editing.  However, I
> > dunno why it is not supported so far.  Since I'm not familar with
> > Chinese, I dunno if it will actually work for Chinese.
> 
> I am not familiar with Chinese and Korean also.
> After what I have heard, EUC-CN (zh_CN.eucCN) can be edited without
> problem with an editor that deal with EUC-JP (ja_JP.eucJP) and
> Chinese fonts. So, I think there is no problem adding zh_CN.eucCN
> support to tcsh, but we may ask someone using the locale to confirm
> it. I will write an e-mail to stable and i18n on this issue.

I've extended patch for tcsh which includes autodetection of eucXX
like locales for ja_JP and ko_JR. This patch includes detection
of alias for ja_JP.SJIS (ja_JP.Shift_JIS) locale and *most important*
detection of Chinese EUC locale (zh_CN.EUC and zh_CN.eucCN) in same
manner as Japanese and Korean.

It would be nice if someone familiar with Chinese check original
version of tcsh (chinese support) and with this patch and notice
me any improvement/problems in results :-)

Index: sh.set.c
===================================================================
RCS file: /home/cvs/freebsd/src/contrib/tcsh/sh.set.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 sh.set.c
--- sh.set.c	5 Sep 2001 17:49:31 -0000	1.1.1.4
+++ sh.set.c	6 Jan 2002 18:10:19 -0000
@@ -1212,8 +1212,10 @@
     } dspmt[] = {
 	{ STRLANGEUCJP, STRKEUC },
 	{ STRLANGEUCKR, STRKEUC },
+	{ STRLANGEUCZH, STRKEUC },
 	{ STRLANGEUCJPB, STRKEUC },
 	{ STRLANGEUCKRB, STRKEUC },
+	{ STRLANGEUCZHB, STRKEUC },
 	{ STRLANGSJIS, STRKSJIS },
 	{ STRLANGSJISB, STRKSJIS },
 	{ STRLANGBIG5, STRKBIG5 },
Index: tc.const.c
===================================================================
RCS file: /home/cvs/freebsd/src/contrib/tcsh/tc.const.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 tc.const.c
--- tc.const.c	5 Sep 2001 17:49:31 -0000	1.1.1.4
+++ tc.const.c	6 Jan 2002 18:17:21 -0000
@@ -134,7 +134,7 @@
 /* STRLANGEUCJP,STRLANGEUCJPB = EUCJP Trap */
 /* STRLANGEUCKR,STRLANGEUCKRB = EUCKR Trap */
 /* STRLANGSJIS,STRLANGSJISB = SJIS Trap */
-#  if defined(__FreeBSD__) || defined(__uxps__) || defined(sgi)  || defined(aix) || defined(__CYGWIN__) || defined(linux)
+#  if defined(__uxps__) || defined(sgi)  || defined(aix) || defined(__CYGWIN__) || defined(linux)
 Char STRLANGEUCJP[]	= { 'j', 'a', '_', 'J', 'P', '.', 'E', 'U', 'C', '\0' };
 Char STRLANGEUCKR[]	= { 'k', 'o', '_', 'K', 'R', '.', 'E', 'U', 'C', '\0' };
 #   if defined(__uxps__)
@@ -156,44 +156,61 @@
 Char STRLANGSJISB[]	= { '\0' };
 Char STRLANGBIG5[]	= { 'z', 'h', '_', 'T', 'W', '.', 'B', 'i', 'g', '5',
 			    '\0' };
-#  elif defined(linux)
-Char STRLANGEUC[]	= { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J',
+Char STRLANGEUCZH[]	= { '\0' };
+Char STRLANGEUCZHB[]	= { '\0' };
+#  elif defined(__FreeBSD__)
+Char STRLANGEUCJP[]	= { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J',
 			    'P', '\0' };
-Char STRLANGEUCB[]	= { 'j', 'a', '_', 'J', 'P', '.', 'u', 'j', 'i', 's',
-			    '\0' };
+Char STRLANGEUCJPB[]	= { 'j', 'a', '_', 'J', 'P', '.', 'E', 'U', 'C', '\0' };
+Char STRLANGEUCKR[]	= { 'k', 'o', '_', 'K', 'R', '.', 'e', 'u', 'c', 'K',
+			    'R', '\0' };
+Char STRLANGEUCKRB[]	= { 'k', 'o', '_', 'K', 'R', '.', 'E', 'U', 'C', '\0' };
+Char STRLANGEUCZH[]	= { 'z', 'h', '_', 'C', 'N', '.', 'e', 'u', 'c', 'C',
+			    'N', '\0' };
+Char STRLANGEUCZHB[]	= { 'z', 'h', '_', 'C', 'N', '.', 'E', 'U', 'C', '\0' };
 Char STRLANGSJIS[]	= { 'j', 'a', '_', 'J', 'P', '.', 'S', 'J', 'I', 'S',
 			    '\0' };
-Char STRLANGSJISB[]	= { '\0' };
-Char STRLANGBIG5[]	= { '\0' };
+Char STRLANGSJISB[]	= { 'j', 'a', '_', 'J', 'P', '.', 'S', 'h', 'i', 'f',
+			    't', '_', 'J', 'I', 'S', '\0' };
+Char STRLANGBIG5[]	= { 'z', 'h', '_', 'T', 'W', '.', 'B', 'i', 'g', '5',
+			    '\0' };
 #  elif defined(__uxpm__)
 Char STRLANGEUCJP[]	= { 'j', 'a', 'p', 'a', 'n', '\0' };
 Char STRLANGEUCKR[]	= { 'k', 'o', 'r', 'e', 'a', '\0' };
+Char STRLANGEUCZH[]	= { '\0' };
 Char STRLANGEUCJPB[]	= { '\0' };
 Char STRLANGEUCKRB[]	= { '\0' };
+Char STRLANGEUCZHB[]	= { '\0' };
 Char STRLANGSJIS[]	= { '\0' };
 Char STRLANGSJISB[]	= { '\0' };
 Char STRLANGBIG5[]	= { '\0' };
 #  elif defined(SOLARIS2)
 Char STRLANGEUCJP[]	= { 'j', 'a', '\0' };
 Char STRLANGEUCKR[]	= { 'k', 'o', '\0' };
+Char STRLANGEUCZH[]	= { '\0' };
 Char STRLANGEUCJPB[]	= { 'j', 'a', 'p', 'a', 'n', 'e', 's', 'e', '\0' };
 Char STRLANGEUCKRB[]	= { 'k', 'o', 'r', 'e', 'a', 'n', '\0' };
+Char STRLANGEUCZHB[]	= { '\0' };
 Char STRLANGSJIS[]	= { '\0' };
 Char STRLANGSJISB[]	= { '\0' };
 Char STRLANGBIG5[]	= { '\0' };
 #  elif defined(hpux)
 Char STRLANGEUCJP[]	= { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J', 'P' };
 Char STRLANGEUCKR[]	= { 'k', 'o', '_', 'K', 'R', '.', 'e', 'u', 'c', 'K', 'R' };
+Char STRLANGEUCZH[]	= { '\0' };
 Char STRLANGEUCJPB[]	= { '\0' };
 Char STRLANGEUCKRB[]	= { '\0' };
+Char STRLANGEUCZHB[]	= { '\0' };
 Char STRLANGSJIS[]	= { '\0' };
 Char STRLANGSJISB[]	= { '\0' };
 Char STRLANGBIG5[]	= { '\0' };
 #  else
 Char STRLANGEUCJP[]	= { '\0' };
 Char STRLANGEUCKR[]	= { '\0' };
+Char STRLANGEUCZH[]	= { '\0' };
 Char STRLANGEUCJPB[]	= { '\0' };
 Char STRLANGEUCKRB[]	= { '\0' };
+Char STRLANGEUCZHB[]	= { '\0' };
 Char STRLANGSJIS[]	= { '\0' };
 Char STRLANGSJISB[]	= { '\0' };
 Char STRLANGBIG5[]	= { '\0' };

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020106203845.A64542>