Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jun 2001 12:21:30 +0900
From:      Issei Suzuki <issei@issei.org>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>, i18n@FreeBSD.ORG
Cc:        FreeBSD-tech-jp@jp.FreeBSD.org
Subject:   Re: Patch for FreeBSD-current
Message-ID:  <20010616113610.9058.ISSEI@issei.org>
In-Reply-To: <20010616024521.A22793@nagual.pp.ru>
References:  <20010616014130.9052.ISSEI@issei.org> <20010616024521.A22793@nagual.pp.ru>

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

/Background/

Tcsh does not use locales provied by libc (LC_CTYPE) to handle multibyte
I/O stream, but uses their own code.  And the shell variable "dspmbyte"
controls its behaviour as described in manpage.

Anyway, it is rather confusing to set both locale related environment
variables (e.g. LANG, LC_ALL) and the shell variable "dspmbyte", so tcsh
behaves as follows.

   When the locale related environment variable is set and the shell
   variable "dspmbyte" is not defined, tcsh looks up its internal table
   that is defined in tc.const.c and it automatically define dspmbyte.

If "dspmbyte" has already been defined, tcsh does not change "dspmbyte"
value, even if the user change the locale related environment variables.


On Sat, 16 Jun 2001 02:45:22 +0400
"Andrey A. Chernov" <ache@nagual.pp.ru> wrote:

> On Sat, Jun 16, 2001 at 01:57:17 +0900, Issei Suzuki wrote:
> > Recently, FreeBSD project has decided to rename their locale name,
> > so please apply the following patch.
> > 
> 
> Please don't, this patch is not yet ready for commit.
> 
> >  Char STRLANGEUCJPB[]	= { 'j', 'a', '_', 'J', 'P', '\0' };
> >  Char STRLANGEUCKRB[]	= { 'k', 'o', '_', 'K', 'R', '\0' };
> > +#   elif defined(__FreeBSD__)
> > +Char STRLANGEUCJPB[]	= { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J', 'P', '\0' };
> > +Char STRLANGEUCKRB[]	= { 'k', 'o', '_', 'K', 'R', '.', 'e', 'u', 'c', 'K', 'R', '\0' };
> 
> 
> You shoud rely not on __FreeBSD__ only but on __FreeBSD_version, too
> ( >= 500020) because this change not planned to be merged to FreeBSD 4.x
> yet.

The patch above adds the "ja_JP.eucJP" and "ko_KR.eucKR" entry to the tcsh
internal table, so the tcsh behaves as follows

  When the user sets the environment variables to "ja_JP.EUC",
  "ko_KR.EUC" *or* "ja_JP.eucJP", "ko_KR.eucKR", and the shell
  variable "dspmbyte" is not defined, tcsh automatically defined
  "dspmbyte" to euc.

I think it does not harm FreeBSD 4.x nor FreeBSD-current before the
change, since they do not provide the locales named "ja_JP.eucJP" nor
"ko_KR.eucKR."

But without these entries, tcsh I/O seems to be broken when you remove
old locale names from FreeBSD and set the environment variable to new
locale names.

Any comments?

-- 
Issei.-


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




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