Subject: Bug#3967: hex codes instead of 8-bit characters

From: [email-masked] (David Frey)
Date: Wed, 31 Jul 1996 21:42:34 +0200 (MET DST)

Marek> nvi displays hex codes instead of the actual 8-bit (>127) characters
Marek> (elvis displays them correctly, for example) and there is no option
Marek> to change this behaviour (or at least I couldn't find it in the
Marek> documentation - it is only possible to use octal codes instead).

I had to hack a bit around with the locale-calls and to recompile:

diff -u common/main.c /tmp/nvi-1.34.patched/common/main.c
--- common/main.c	Wed Aug 17 20:28:55 1994
+++ /tmp/nvi-1.34.patched/common/main.c	Sat Jul 13 23:14:45 1996
@@ -70,6 +70,8 @@
 #include <regex.h>
 #include <pathnames.h>
 
+#include <locale.h>
+
 #include "vi.h"
 #include "excmd.h"
 #include "../ex/tag.h"
diff -u common/term.c /tmp/nvi-1.34.patched/common/term.c
--- common/term.c	Wed Aug 17 20:29:03 1994
+++ /tmp/nvi-1.34.patched/common/term.c	Sat Jul 13 23:55:32 1996
@@ -51,6 +51,8 @@
 #include <termios.h>
 #include <unistd.h>
 
+#include <locale.h>
+
 #include "compat.h"
 /*
  * XXX
@@ -147,6 +149,7 @@
 	 * 8-bit character set, as long as nul isn't a character.
 	 */
 	(void)setlocale(LC_ALL, "");
+	(void)setlocale(LC_CTYPE, "");
 	key_init(sp);
 
 	gp = sp->gp;

I think it's a setlocale bug/deficiency in GNU libc. Anyway, the characters
got otherwise wrongly characterized in the initialisation...

David
-- 
David Frey <[email-masked]>|Microsoft isn't the answer...it's the QUESTION.
Schlieren, Switzerland        |``No'' is the answer.
PGP-Key available on request  |Use Debian GNU/Linux!