Re: Displaying 8-bit characters
On Sat, Nov 27, 1999 at 04:35:46PM +0100, Wichert Akkerman wrote:
> Previously Michael Sobolev wrote:
> > I'm trying to use my [incomplete :)] translation with dselect. At the moment,
> > the only displayable phrases are in main menu (access, update, etc). Everything
> > Russian on select screen does not look Russian at all: all words get converted
> > to pseudographics etc. This was the problem with 1.4.1.*, it's the problem with
> > 1.6. Please advise what to do.
>
> We need to figure out why ncurses strips the 8th bit on anything that is
> bold..
Hi,
After playing abit with /usr/doc/libncurses4-dev/examples/ncurses.c I found
that at least on of examples "exercise pad features" isn't 8-bit clean while
for example "character attribute test" is ok. Most important difference was
waddch function - I got proper display after changing it to waddnstr.
Next I went to /usr/doc/libncurses4-dev/ncurses-intro.html#attributes and
found:
There are two ways to make highlights. One is to logical-or the value of
the highlights you want into the character argument of an addch() call, or
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
any other output call that takes a chtype argument.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
First place that I found in dselect source (I didn't analysed more) that is
responsible for displaying "--- any text ---" separators in "dselect select"
command gives me readable screen:
--- dpkg-1.6.1/dselect/pkgtop.cc Sat Oct 30 15:09:59 1999
+++ dpkg-1.6.1.NEW/dselect/pkgtop.cc Sun Nov 28 13:32:13 1999
@@ -242,7 +242,7 @@
wattrset(listpad, selected ? selstatesel_attr : selstate_attr);
p= buf;
- while (i>0 && *p) { waddch(listpad, *p); p++; i--; }
+ while (i>0 && *p) { waddnstr(listpad, p,1); p++; i--; }
wattrset(listpad, selected ? listsel_attr : list_attr);
waddch(listpad,' ');
Mirek
Reply to: