[Top][All Lists]

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

Re: form_driver and wide-char

From: Thomas Dickey
Subject: Re: form_driver and wide-char
Date: Thu, 7 Dec 2006 08:00:30 -0500 (EST)

On Wed, 6 Dec 2006, Brian Tan wrote:

Thomas Dickey wrote:
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.

This is probably the best place to focus on right now.
The two (I think) are independent

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

It's supposed to do the latter - but it's likely that you're better able to see problems. I tested it by select/paste from the UTF-8 scripts in
the dialog package, combined with editing from the keyboard.  At the same
time, my test program would set/get from the field buffer, so I could see mismatches.

So - going back to testing this area, along with some sample data (and locale information from you) would help to reproduce the problem and focus on what's going wrong.


Thomas E. Dickey

reply via email to

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