[Top][All Lists]

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

Re: multi-line field issues

From: tjareson
Subject: Re: multi-line field issues
Date: Fri, 31 Aug 2012 09:10:30 -0300
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120713 Thunderbird/14.0

The hint to the examples brought me to the solution, thanks for that!

As I'm programming with codeblocks somehow other versions of the ncurses library (from /lib) were linked, which always caused different results compared with the test applications.

What was confusing that libraries can be found at different locations in the system. I found versions in /lib /usr/lib and of course in /ncurses-5.9/lib. Somehow codeblocks always seems to look first in /lib. And there is only libncurses.so.5.7. and libncursesw.so.5.7 (but no libform*)

So my impression is, that codeblocks linked ncurses 5.7 from lib but the libform with a more current version 5.9. Which somehow ended in this weird results that multiline was fixed, but Umlauts not working anymore, what made me assume that all ncurses related libs are the most current version...

So I set in codeblocks now to link libncursesw.a etc. directly. Not sure if this is the most efficient way to do, as the application binary of course gets bigger then. But at least now everything works.

A nightshift with some insights... :-)


Am 30.08.2012 22:43, schrieb Thomas Dickey:
On Thu, Aug 30, 2012 at 09:20:04PM -0300, tjareson wrote:
Unfortunately things were not as easy as I first thought:

Since I upgraded from ncurses 5.7 to 5.9 the multi line field issue
is solved, but all off a sudden German Umlaut (äöü etc.) are not
working anymore when using form_driver, which worked before with
exactly the same source code.
Of course, locale settings didn't change. Also setlocale-settings
command in the source is not change (de_DE.UTF-8 as before).

Now everytime I press an Umlaut key I get 3-4 "weird" chars instead
of that one sign displayed.
ncursesw / formw etc. is linked like it was before. Also the make
was done with wide-character support. Nothing changed accept the

Was there any major change regarding utf8 / locale support since
5.7? Honestly I'm a little bit lost.
There were various bug-fixes - see

For instance I see a fix in 5.8 for field_buffer which might be the
one you're referring to.

The funny thing is: data I read from the database get displayed
properly in forms, only entering umlauts with the keyboard is not
working anymore.
Testing by pasting various characters into ncurses' demo_forms,
I'm not seeing the problem.
What might be worth to mention: I'm using wgetch() to get keyboard
inputs. (as before) If I'm using wget_wch() instead, I only get an
empty character shown by form_driver.
It's not generally part of a package, but ncurses has a trace feature
which can be compiled-in.  Using the trace is where I'd start for
analyzing some odd problem.
Am 30.08.2012 18:00, schrieb tjareson:
Am 30.08.2012 07:13, schrieb Thomas Dickey:
On Wed, Aug 29, 2012 at 09:34:01PM +0000, Tjareson wrote:
Sentinel <sentinel.2001 <at> gmx.com> writes:

I have been studying some apps that
ncurses and found that none of them use multiline. Most just
invoke vim or
write their own.

Thus, at the time of set_field_buffer and field_buffer if data
transformation can be done so a file can be read and set in, and then
saved out, and it remains as is, it would be great.
I'm currently implementing an application using ncurses and
also tried to use a
multiline field to edit longer texts.

Is there any solution to that issue? I have the problem that I
can edit properly
in a multiline field, I even can load a TEXT-field from MYSQL
into it and it
gets displayed properly (also with new lines etc.)

But I was never able to get more back from a multiline field
that the first row.

Someone wrote there is an application-wise workaround for
that. Any ideas what
  to do solve that issue?
The example "demo_forms" seems to work - I'm not sure what issue you're
reporting.  (A short sample program might help).

Thanks a lot for quick reply. I'm sorry but I had to find out that
this Ubuntu here was running with an ncurses version 5.7 for
whatever reason. After updating everything, all is working fine.
(Could have checked that before...)
And: ncurses is great. Programming text interfaces is so much
easier with it. :-) Thanks for maintaining all this.


reply via email to

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