iutf8 flag gets lost
Andrei Paskevich
andrei at capet.iut-fbleau.fr
Wed Jan 17 19:40:01 CET 2007
Hello. I use rxvt-unicode 8.1 on Linux. I found that in my setup
(a pretty standard Slackware 11), the flag IUTF8 is not set when
a terminal is started under LC_CTYPE=en_US.UTF-8. However, if I
set the charset "in place" with "echo -ne '\e]701;en_US.UTF-8\a",
the flag is well set (btw, thank you much for this great feature!).
It is the same problem, I guess, that was reported by George Nychis
some time ago.
As far as I can tell, the problem is in the init.C code. The flag
is initially set by "pty->set_utf8_mode (enc_utf8)" at (init.C:1318).
But then it gets lost, when we initialize the slave terminal by
"SET_TTYMODE (STDIN_FILENO, &tio)" at (init.C:1399) with the "tio"
structure filled by "rxvt_get_ttymode (&tio, er)" at (init.C:1334).
Here is a little proof-of-concept patch that fixes this behaviour.
====================== urxvt-iutf8.diff ======================
--- rxvt-unicode-8.1/src/init.C 2006-12-07 04:18:34.000000000 +0100
+++ rxvt-unicode-8.1-ap/src/init.C 2007-01-17 18:36:51.000000000 +0100
@@ -1333,6 +1333,13 @@
rxvt_get_ttymode (&tio, er);
+#ifdef IUTF8
+ if (enc_utf8)
+ tio.c_iflag |= IUTF8;
+ else
+ tio.c_iflag &= ~IUTF8;
+#endif
+
#if ENABLE_FRILLS
if (rs[Rs_pty_fd])
return;
====================== urxvt-iutf8.diff ======================
Best regards,
Andrei
More information about the rxvt-unicode
mailing list