From owner-freebsd-hackers Tue Mar 11 10:09:35 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id KAA25845 for hackers-outgoing; Tue, 11 Mar 1997 10:09:35 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id KAA25835 for ; Tue, 11 Mar 1997 10:09:29 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA25667; Tue, 11 Mar 1997 11:00:40 -0700 From: Terry Lambert Message-Id: <199703111800.LAA25667@phaeton.artisoft.com> Subject: Re: Q: Locale - is it possible to change on the fly? To: pam@polynet.lviv.ua Date: Tue, 11 Mar 1997 11:00:40 -0700 (MST) Cc: hackers@freebsd.org In-Reply-To: <199703111221.OAA21499@NetSurfer.lp.lviv.ua> from "Adrian Pavlykevych" at Mar 11, 97 02:25:23 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I have nonstandard question: is it possible to change locale settings > inside proces on the fly? Yes. setlocale( ..., new_locale); > I need to sort some data according to one > collation order and some according to other. Will strcoll and other > locale-enabled functions be changing their behavior, if I'll be changing > locale before their invocations ? Yes. Be forewarned: locale is a mechansim for localizing software to a single locale, not for localizing software to multiple locales simultaneously. Like Unicode, it is a tool for localization, not multinationalization; tools for multinationalization don't really exist, per se, since their application is limited to language researchers and translators. The best you can hope for is picking a single round-trip character set that supports both your languages. You will never find one of these for, for example, Chinese and Japanese. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.