bug-ncurses
[Top][All Lists]
Advanced

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

Re: form_driver and non-ASCII-characters


From: Thomas Dickey
Subject: Re: form_driver and non-ASCII-characters
Date: Sat, 23 Apr 2005 14:45:13 -0400 (EDT)

On Sat, 23 Apr 2005, Moritz Beller wrote:

Hi there,

I simply can't get ncurses to display umlaut characters: Given an
umlaut character stored in ch (of type char), form_driver(my_form,
ch); doesn't consider it a valid character.

What to do? I have set the $LANG environment.

address@hidden $ export LANG=de
address@hidden $ echo $LANG
de

The "de" may be an alias, but my understanding is that "de_DE" would be
the proper string to use.  Usually the "locale" program reports an error
if the combination is not valid.

address@hidden $ ./programme

and within the programme setlocale(LC_ALL,"de_DE");

Or you could have used (relying upon the environment variables)

        setlocale(LC_ALL, "");

But note that LC_ALL itself corresponds to an environment variable.
I usually do quick checks with a script that sets just the two that
are most important (note that it unsets LC_CTYPE, in case it is not
consistent):

#!/bin/sh
unset LANG
unset LC_ALL
unset LC_CTYPE
export LANG=$1
export LC_ALL=$1
shift
$*

with-locale de_DE locale
LANG=de_DE
LC_CTYPE="de_DE"
LC_NUMERIC="de_DE"
LC_TIME="de_DE"
LC_COLLATE="de_DE"
LC_MONETARY="de_DE"
LC_MESSAGES="de_DE"
LC_PAPER="de_DE"
LC_NAME="de_DE"
LC_ADDRESS="de_DE"
LC_TELEPHONE="de_DE"
LC_MEASUREMENT="de_DE"
LC_IDENTIFICATION="de_DE"
LC_ALL=de_DE

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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