[Top][All Lists]

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

Re: wide characters, get_wch() and form_driver() - cannot get them worki

From: Thomas Dickey
Subject: Re: wide characters, get_wch() and form_driver() - cannot get them working together.
Date: Wed, 18 Jun 2008 11:01:00 -0400 (EDT)

On Wed, 18 Jun 2008, Adam Spragg wrote:


On Tuesday 17 June 2008 14:57:01 Thomas Dickey wrote:
The resolution was basically saying that the form library gets
compiled to support wide-character mode, and that _it_ knows only
about byte-at-a-time adds via addch, but that (with the limitation of
not moving the cursor in the middle of the operation), should work.

I've compiled my own ncurses library from the gnu sources, rebuilt the
test program against that, linked with it, run it and got the same
problem - E_UNKNOWN_COMMAND when adding the first character of a '£',
random accented vowels from unicode code points 192-255, and '€' - the
euro symbol. When trying to enter the Euro symbol, the status line
prints out the correct character id of 8364 (0x20ac) and points out
that I got the E_UNKNOWN_COMMAND on byte 0 of 3, which is the correct
number of bytes for the utf-8 encoding of that character.

I configured ncurses with the command line:
 ./configure --prefix=/home/adam --enable-widec --with-shared

I didn't get that far (was doing maintenance for $dayjob last night).

and checked the test program was loading the new copy of the library
with strace.

Anything else I can check on my end?

Aside from perhaps suspecting the chunk at the end of form_driver
(which looks okay at the moment):

       * If we're using 8-bit characters, iscntrl+isprint cover the whole set.
       * But with multibyte characters, there is a third possibility, i.e.,
       * parts of characters that build up into printable characters which are
       * not considered printable.
       * FIXME: the wide-character branch should also use Check_Char().
      if (!iscntrl(UChar(c)))
      if (isprint(UChar(c)) &&
          Check_Char(form->current->type, c,
                     (TypeArgument *)(form->current->arg)))
        res = Data_Entry(form, c);

For investigating your core dump, I intended to build a debug-version,
and run it with valgrind (perhaps this evening).


p.s. Just out of curiosity, are you seeing the '£' (pound) and '€'
(euro) characters correctly in the emails I'm sending? I've checked my
outgoing mail and as far as I can tell it's being sent in utf-8 and is
identifying itself as utf-8. But your earlier reply to had the charset
set to X-UNKNOWN which caused some problems displaying the pound
character, and the archived version at lists.gnu.org[0] isn't quite
right either.

at the moment, I'm connected to my mail-provider in pine, and that shows
the Latin-1 codes (no UTF-8). On my home machine, that would work properly.

Thomas E. Dickey

reply via email to

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