Author: rascov@rascov.tw Date: Wed Feb 11 05:51:31 CST 2009 Subject: show encoding in hardstatus, orginal from FreeBSD by yzlin@cs.nctu.edu.tw Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/286810 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533498 Index: screen/screen.c =================================================================== --- screen.orig/screen.c 2012-03-20 22:41:24.000000000 +0100 +++ screen/screen.c 2012-03-20 22:41:49.000000000 +0100 @@ -2801,6 +2801,18 @@ } p += strlen(p) - 1; break; + #ifdef ENCODINGS + case 'e': + *p = 0; + D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0; + if (win && win->w_encoding) + { + *p++ = ' '; + strcpy(p, EncodingName(win->w_encoding)); + } + p += strlen(p) - 1; + break; + #endif case '{': { char rbuf[128]; Index: screen/process.c =================================================================== --- screen.orig/process.c 2012-03-20 22:41:05.000000000 +0100 +++ screen/process.c 2012-03-20 22:41:49.000000000 +0100 @@ -3687,6 +3687,7 @@ { WinSwitchEncoding(fore, n); ResetCharsets(fore); + RedisplayDisplays(0); } else if (i && display) D_encoding = n;