Add explicit 'ansi-bbs' as ANSI terminal type

This commit is contained in:
Bryan Ashby 2015-12-14 10:33:15 -07:00
parent fce6f899a7
commit 1404768ed3
1 changed files with 31 additions and 30 deletions

View File

@ -54,35 +54,7 @@ function ClientTerminal(output) {
}, },
set : function(ttype) { set : function(ttype) {
termType = ttype.toLowerCase(); termType = ttype.toLowerCase();
//
// ANSI terminals should be encoded to CP437
//
// Some terminal types provided by Mercyful Fate / Enthral:
// ANSI-BBS
// PC-ANSI
// QANSI
// SCOANSI
// VT100
// XTERM
// * PuTTY
// LINUX
// * JuiceSSH - also via TERM=
// QNX
// SCREEN
// * ConnectBot
//
// syncterm
// *
//
// Reports from various terminals
// SyncTERM
// * syncterm
//
// PuTTY
// * xterm
//
//
if(this.isANSI()) { if(this.isANSI()) {
this.outputEncoding = 'cp437'; this.outputEncoding = 'cp437';
} else { } else {
@ -137,8 +109,37 @@ ClientTerminal.prototype.disconnect = function() {
}; };
ClientTerminal.prototype.isANSI = function() { ClientTerminal.prototype.isANSI = function() {
//
// ANSI terminals should be encoded to CP437
//
// Some terminal types provided by Mercyful Fate / Enthral:
// ANSI-BBS
// PC-ANSI
// QANSI
// SCOANSI
// VT100
// QNX
//
// Reports from various terminals
//
// syncterm:
// * SyncTERM
//
// xterm:
// * PuTTY
//
// ansi-bbs:
// * fTelnet
//
// screen:
// * ConnectBot (Android)
//
// linux:
// * JuiceSSH (note: TERM=linux also)
//
// :TODO: Others?? // :TODO: Others??
return [ 'ansi', 'pc-ansi', 'qansi', 'scoansi', 'syncterm' ].indexOf(this.termType) > -1; return [ 'ansi', 'pc-ansi', 'ansi-bbs', 'qansi', 'scoansi', 'syncterm' ].indexOf(this.termType) > -1;
}; };
// :TODO: probably need to update these to convert IAC (0xff) -> IACIAC (escape it) // :TODO: probably need to update these to convert IAC (0xff) -> IACIAC (escape it)