From owner-freebsd-i18n Sun Sep 3 7:57: 2 2000 Delivered-To: freebsd-i18n@freebsd.org Received: from columbus.cris.net (columbus.cris.net [212.110.128.65]) by hub.freebsd.org (Postfix) with ESMTP id 085CA37B424 for ; Sun, 3 Sep 2000 07:56:51 -0700 (PDT) Received: from ark.cris.net (ark.cris.net [212.110.128.68]) by columbus.cris.net (8.9.3/8.9.3) with ESMTP id RAA69348; Sun, 3 Sep 2000 17:56:15 +0300 (EEST) Received: (from phantom@localhost) by ark.cris.net (8.9.3/8.9.3) id RAA46114; Sun, 3 Sep 2000 17:55:58 +0300 (EEST) (envelope-from phantom) Date: Sun, 3 Sep 2000 17:55:58 +0300 From: Alexey Zelkin To: "Andrey A. Chernov" Cc: Alexander Voropay , i18n@FreeBSD.ORG Subject: Re: Request for review: locale aliases support for libc Message-ID: <20000903175558.A45276@ark.cris.net> References: <34d701c01424$4a2e4b60$cd0d11ac@host205.spb.in.rosprin.ru> <20000901192017.B29804@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000901192017.B29804@nagual.pp.ru>; from ache@nagual.pp.ru on Fri, Sep 01, 2000 at 07:20:17PM +0400 X-Operating-System: FreeBSD 3.5-STABLE i386 Sender: owner-freebsd-i18n@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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