--- rxvt-unicode/src/init.C 2006/07/05 22:46:14 1.174 +++ rxvt-unicode/src/init.C 2007/01/20 00:37:13 1.175 @@ -1315,11 +1315,6 @@ if (!pty->get ()) rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); - pty->set_utf8_mode (enc_utf8); - - /* set initial window size */ - tt_winch (); - int er; #ifndef NO_BACKSPACE_KEY @@ -1332,6 +1327,11 @@ er = -1; rxvt_get_ttymode (&tio, er); + pty->set_utf8_mode (enc_utf8); + SET_TTYMODE (STDIN_FILENO, &tio); /* init terminal attributes */ + + /* set initial window size */ + tt_winch (); #if ENABLE_FRILLS if (rs[Rs_pty_fd]) @@ -1396,8 +1396,6 @@ { char *login; - SET_TTYMODE (STDIN_FILENO, &tio); /* init terminal attributes */ - if (OPTION (Opt_console)) { /* be virtual console, fail silently */ #ifdef TIOCCONS