Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: UTF-8 fonts
- X-seq: zsh-workers 17731
- From: "Nadav Har'El" <nyh@xxxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: UTF-8 fonts
- Date: Wed, 25 Sep 2002 16:27:19 +0300
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Hebrew-date: 19 Tishri 5763
- In-reply-to: <10303.1032953780@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <6134254DE87BD411908B00A0C99B044F042E3E33@xxxxxxxxxxxxxxxxxxxxxxx> <10303.1032953780@xxxxxxx>
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@xxxxxxxxxxxxxxxxxxx |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |For people who like peace and quiet - a
http://nadav.harel.org.il |phoneless cord.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author