From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13260 invoked from network); 25 Sep 2002 13:27:31 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 25 Sep 2002 13:27:31 -0000 Received: (qmail 2370 invoked by alias); 25 Sep 2002 13:27:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17731 Received: (qmail 2355 invoked from network); 25 Sep 2002 13:27:25 -0000 Date: Wed, 25 Sep 2002 16:27:19 +0300 From: "Nadav Har'El" To: Peter Stephenson Cc: Zsh hackers list Subject: Re: UTF-8 fonts Message-ID: <20020925132719.GA23347@fermat.math.technion.ac.il> References: <6134254DE87BD411908B00A0C99B044F042E3E33@mowd019a.mow.siemens.ru> <10303.1032953780@csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10303.1032953780@csr.com> User-Agent: Mutt/1.4i Hebrew-Date: 19 Tishri 5763 On Wed, Sep 25, 2002, Peter Stephenson wrote about "Re: UTF-8 fonts": > > > - determining whether the terminal is actually in UTF-8 mode, probably > > > from the locale > > > > Impossible. Local names are just arbitrary chosen strings; there is no > > "character set code" defined in any locale definition, at least on Unix. > > Read the document at the link I gave which suggests otherwise. However, > I now think we can in any case leave this to the mb* suite to decide. Here's a piece of code I used in one of my programs to tell whether the user's terminal is in utf8 mode, based on the locale: setlocale(LC_CTYPE, ""); is_utf8= !strcmp(nl_langinfo(CODESET),"UTF-8"); -- Nadav Har'El | Wednesday, Sep 25 2002, 19 Tishri 5763 nyh@math.technion.ac.il |----------------------------------------- Phone: +972-53-245868, ICQ 13349191 |For people who like peace and quiet - a http://nadav.harel.org.il |phoneless cord.