Subject: lib/10723: curses getch() is not 8bit clean
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itojun@itojun.org>
List: netbsd-bugs
Date: 07/31/2000 08:13:14
>Number: 10723
>Category: lib
>Synopsis: curses getch() is not 8bit clean
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 31 08:14:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Jun-ichiro itojun Hagino
>Release: 20000728 userland
>Organization:
itojun.org
>Environment:
System: NetBSD starfruit.itojun.org 1.5C NetBSD 1.5C (STARFRUIT) #80: Mon Jul 31 13:13:49 JST 2000 itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT i386
>Description:
curses getch() is not 8bit clean. if 0x7f - 0xff chars comes in from
input stream, getch() returns 0x00.
>How-To-Repeat:
#include <curses.h>
main()
{
int c;
initscr();
noecho();
while ((c = getch()) != EOF) {
printw("<%x>", c);
if (c == '\n')
refresh();
}
}
input some 8bit chars. you will see <0> on the screen.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: