[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LANG env var

From: Bob Rossi
Subject: Re: LANG env var
Date: Wed, 15 Feb 2006 13:58:44 -0500
User-agent: Mutt/1.5.9i

On Wed, Feb 15, 2006 at 01:06:47PM -0500, Thomas Dickey wrote:
> On Wed, 15 Feb 2006, Bob Rossi wrote:
> >Hi,
> >
> >Does anyone know if ncurses looks at and uses the LANG environment
> >variable?
> yes/no: ncurses expects that the application has called setlocale()
> to use the desired locale.  That function takes into account $LANG
> and related variables.

OK, I defiantly have not called setlocale (). What is effected if I do
not do that?

In particular, I would love it if you could explain how LANG effects an
ncurses program.

> >I have someone reporting this:
> > I was wondering if it would be hard to fix cgdb to work better
> > with a UTF-8 code page.  My locale is "en_US.UTF-8" and when I
> > run cgdb the source file on the top half has a ~� at the left
> > instead of just a ~.  Not a big deal, but I was just curious
> > about it.
> offhand, google indicates cgdb is a termcap application and is not
> relying on ncurses to solve this problem.

What problem? I don't understand how LANG effects ncurses. Could you
explain this?

CGDB does use ncurses to draw to the screen. However, I wrote a custom
keyboard input function to capture keys. I look at both the termcap and
the terminfo database to determine what the special key mappings are. I
did this because I need to pass on the raw data to readline in certain
circumstances. Does ncurses provide the application level with the raw
data that made up a particular key?

And again, is any of this effected by the LANG environment variable?

Bob Rossi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]