bug-ncurses
[Top][All Lists]
Advanced

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

Re: form_driver and wide-char


From: Brian Tan
Subject: Re: form_driver and wide-char
Date: Wed, 06 Dec 2006 22:24:07 -0500
User-agent: Thunderbird 1.5.0.8 (X11/20061107)

Thomas Dickey wrote:
On Wed, 6 Dec 2006, Brian Tan wrote:


Thomas Dickey wrote:
On Wed, 6 Dec 2006, Brian Tan wrote:

Hi

I am trying to use form_driver with utf8 Chinese input. It seems that form_driver (FC6 ncurses-devel-5.5-24.20060715 FC6) not supporting wide-char

The rpm spec file says it builds libncurses and libncursesw,
and the corresponding libform, libformw, etc.

You should link against -lformw -lncursesw, etc


Yes, as mentioned in my email, program is linked against formw and ncursesw. form_driver ignores any non-ascii char. Is there a "w" equivalent of form_driver (like get_wch vs getch) that I can use ?

sorry - I misread the email. form_driver() only knows how to read bytes.

I hadn't really considered that, since most of the internals of form_driver() are also using bytes rather than wide characters.

It might be nice to have an alternate interface, but I was more
interested in making the form_driver() interface work properly.

Reading your email more closely, I'm not sure whether you are reporting
a problem with set_field_buffer() or with form_driver() - or both.

I am working on "internationalising" an existing 4GL compiler, and got stuck with form_driver for input. As form_driver not accepting non-Ascii, I was thinking of a bypass; using form_driver for Ascii and accessing field buffer directly for widechar.

I guess I am reporting problem with

1. field_buffer(); it does not return mbs correctly. For example, wchar 0x597d -> mbs e5a5bd written with set_field_buffer(), screen form updates and shows “好 " (with trailing space due to strlen=3, I think) but field_buffer() returns c3a5c2a5c2bd, making further wchar entry not possible, unless I keep track of field buffer independently.

2. form_driver; for not accepting wchar or mbs :)

Thank You
Brian


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





reply via email to

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