Hi,

The problem was solved here:
http://mail-index.netbsd.org/netbsd-users/2018/08/10/msg021219.html

I'm attaching Leonardo's patch, please review.

--
caóc
$NetBSD$

Directly use addstr() instead of printw() in order to output every
bytes without any transformation (and hence also correctly displaying
Unicode characters).

--- noice.c.orig	2018-08-10 18:55:47.299592935 +0200
+++ noice.c	2018-08-10 19:01:15.778111428 +0200
@@ -293,7 +293,8 @@
 printmsg(char *msg)
 {
 	move(LINES - 1, 0);
-	printw("%s\n", msg);
+	addstr(msg);
+	addstr("\n");
 }
 
 /* Display warning as a message */
@@ -324,7 +325,7 @@
 printprompt(char *str)
 {
 	clearprompt();
-	printw(str);
+	addstr(str);
 }
 
 /* Returns SEL_* if key is bound and 0 otherwise.
@@ -428,10 +429,16 @@
 	if (strlen(name) > maxlen)
 		name[maxlen] = '\0';
 
-	if (cm == 0)
-		printw("%s%s\n", active ? CURSR : EMPTY, name);
-	else
-		printw("%s%s%c\n", active ? CURSR : EMPTY, name, cm);
+	if (cm == 0) {
+		addstr(active ? CURSR : EMPTY );
+		addstr(name);
+		addstr("\n");
+	} else {
+		addstr(active ? CURSR : EMPTY);
+		addstr(name);
+		addch(cm);
+		addstr("\n");
+	}
 }
 
 int

Reply via email to