Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Sep 2000 17:55:58 +0300
From:      Alexey Zelkin <phantom@FreeBSD.ORG>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        Alexander Voropay <a.voropay@globalone.ru>, i18n@FreeBSD.ORG
Subject:   Re: Request for review: locale aliases support for libc
Message-ID:  <20000903175558.A45276@ark.cris.net>
In-Reply-To: <20000901192017.B29804@nagual.pp.ru>; from ache@nagual.pp.ru on Fri, Sep 01, 2000 at 07:20:17PM %2B0400
References:  <34d701c01424$4a2e4b60$cd0d11ac@host205.spb.in.rosprin.ru> <20000901192017.B29804@nagual.pp.ru>

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

On Fri, Sep 01, 2000 at 07:20:17PM +0400, Andrey A. Chernov wrote:
> On Fri, Sep 01, 2000 at 06:52:03PM +0400, Alexander Voropay wrote:
> >  AFAIK, the presense of any forms of locale "aliasing" does not
> > comply current POSIX specifications :
> >   string=setlocale(LC_xxx, "language_TERRITORY.Codeset");
> > should returns _THE_SAME_ locale name _as requested_.
 
> No, it means that returned string should be not expanded to its full form.
> 
> I.e. setlocale(LC_ALL, "ru") should return "ru" and not "ru_RU.KOI8-R"
> and do all expansions internally and invisible to caller.

Ok. But how to pass to the application information about expanded form of
the locale ? Just some applications use it to build path which contains
some kind of data files. There're few possibilties to do it under mentioned
restrictions:

. make setlocale(LC_XXX, NULL) returning expanded form of the locale name. 

  It will require all applications which need to know expanded form of the
  locale to call setlocale() twice:

  setlocale(LC_ALL, "");
  expandedlocale = setlocale(LC_CTYPE, NULL);

. introduce new function: locale_expand_alias() which should return
  expanded form of the locale string.

I prefer first way because, but not sure about its POSIX/XPG complaince.

-- 
/* Alexey Zelkin               && phantom@cris.net       */
/* Tavric National University  && phantom@FreeBSD.org    */
/* Sysadmin/Developer          && phantom@sms.umc.com.ua */


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?20000903175558.A45276>