bug-ncurses
[Top][All Lists]
Advanced

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

Re: I've made a simple program, showing UTF-8 lower but not uppercase wo


From: amores perros
Subject: Re: I've made a simple program, showing UTF-8 lower but not uppercase working
Date: Fri, 23 Sep 2005 22:48:06 +0000




From: Thomas Dickey To: amores perros CC: mailing list
Subject: Re: I've made a simple program, showing UTF-8 lower but not uppercase working

On Fri, 23 Sep 2005, amores perros wrote:

Since my last post here, I've proceeded to isolate a test program

I read that, but it's been a busy week.
The normal libncurses.so cannot do anything useful with UTF-8.
It won't produce it, cannot read it.

It occurs to me that I could have handled the special case of Latin-1 in a UTF-8 locale, but that isn't generally useful (though I do that in the text editor vile). Something for a to-do list, e.g., to handle the various legacy code that doesn't know anything about locales. It won't be in ncurses 5.5 though.


How is that a special case? Is it because you can convert the UTF-8 back
to Latin-1 and store it in an array of 8-bit entries?

To read/write UTF-8, you need the libncursesw flavor.

I'm sorry to belabor this, but since I'm unsure, is there any way I can
make my program work on systems which have stock ncurses 5.4 installed
(as I gather many Debian systems, and perhaps others, will have)?

Or will I have to say, you cannot use UTF-8 unless you upgrade your
system by installing a widechar-compiled version of ncurses?


Or could I ship ncurses as a subdirectory, rigged to compile
with --with-widechar? But, truthfully, I'm not nearly good enough
with autotools for this to be feasible. It is just that the way
that iconv support comes with an embedded version,  that
makes me think of it.



successfully printing a UTF-8 string out via printf, but then
invoking ncurses and observing mixed results -- the lowercase
letters are ok, but the upperones are apparently trashed (I see
open boxes, and more characters than I should).

I'm still testing on ncurses5.4 from debian linux stable.

Debian/testing has a ncursesw5.4


In the meantime, I've gotten the ncurses5.4 source from a
gnu ftp site, and tried compiling it locally with --with-widechar,
(as I suspect that I need that to get cchar_t defined)
but have immediately run into my ignorance about termcaps
and terminfo -- about which I'm sure there is much on the
Internet that I should read before asking you to hold my
hand. In any case, thank you for the pointer to the debian/testing
package, which might more easily allow me to proceed than
my figuring out how to get my own compiled version going.


Cordially,

Perry






reply via email to

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