From owner-freebsd-questions Tue Oct 31 0:47: 7 2000 Delivered-To: freebsd-questions@freebsd.org Received: from srcso.globis.ru (globis.ru [212.248.80.7]) by hub.freebsd.org (Postfix) with ESMTP id 3B26237B479 for ; Tue, 31 Oct 2000 00:46:59 -0800 (PST) Received: from raduga.dyndns.org (raduga.sochi.net [212.248.82.76]) by srcso.globis.ru (8.9.3/8.9.3) with ESMTP id MAA41175 for ; Tue, 31 Oct 2000 12:09:41 +0300 (MSK) (envelope-from igor@raduga.dyndns.org) Received: (from igor@localhost) by raduga.dyndns.org (8.10.1/8.10.0) id e9V8jq329457 for freebsd-questions@FreeBSD.ORG; Tue, 31 Oct 2000 11:45:52 +0300 Date: Tue, 31 Oct 2000 11:45:52 +0300 From: Igor Roboul To: freebsd-questions@FreeBSD.ORG Subject: Re: International Programming? Message-ID: <20001031114552.A28944@linux.rainbow> Reply-To: igorr@crosswinds.net Mail-Followup-To: freebsd-questions@FreeBSD.ORG References: <002001c04247$2fb0c8c0$0800000a@lanfear.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <002001c04247$2fb0c8c0$0800000a@lanfear.com>; from marcw@lanfear.com on Mon, Oct 30, 2000 at 08:58:26AM +0100 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > that the base strcmp, strcasecmp, and all those that ship in the OS do not > support DBCS, etc ... > > where would be a good place to start? In theory you need only setlocale(LC_ALL,"") in begining of main() Also, notice that locale equivalent for strcmp() is strcoll() If you wish compare two strings and don't care about case, then just use toupper/tolower and use strcoll I don't know about japanese, but for cyrillic it works. About localized messages, this depends on type of program you write. For example, for Motif program it is better use native Motif features, and you'll not have problems with cyrillic, japanese or hebrew (right-to-left) -- Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga", Sochi, Russia http://www.brainbench.com/transcript.jsp?pid=304744 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message