bug-ncurses
[Top][All Lists]
Advanced

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

[patch] wide char form_driver


From: Gaute Hope
Subject: [patch] wide char form_driver
Date: Sat, 23 Nov 2013 21:35:15 +0100
User-agent: Sup/git

Greetings,

We recently ran into some issues with form_driver with UTF-8 input on
Mac OS X. We use ncurses for Sup (a ruby mail client).

I have attached a patch with a form_driver implementation that accepts
wide chars and a type (KEY_CODE_YES or OK) as returned by get_wch (). So
we just skip the whole figuring out whether it is a char or not.

A public method, form_driver_w is implemented with a private Data_Entry_w
method to go with it, they are minor modifications from their existing
siblings:


    form_driver_w (FIELD *field, int type, wchar_t c)


A test program is included in test/: form_driver_w.

I know that a lot of users have had problems with form_driver and wide
chars and I hope this is of interest, but it requires more testing and
probably some more thought. Untested with mouse support.


  https://github.com/gauteh/ncurses/compare/form_driver_w


Cheers, Gaute

Attachment: 0001-Add-form_driver_w.patch
Description: Binary data


reply via email to

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