Skip to content

Commit

Permalink
Use Mystic BBS with Telnet CP437 codepage
Browse files Browse the repository at this point in the history
  • Loading branch information
isontheline committed May 5, 2024
1 parent e7b937c commit 3c56c2a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Host my-mystic-bbs-server-name
```

You will now be able to enjoy your Mystic BBS system with the correct CP437 codepage :
![isontheline maintainer of WebSSH](/images/md-content/dogtown-bbs-venice-ca-good-render.jpg)
![isontheline maintainer of WebSSH](/images/md-content/dogtown-bbs-venice-ca-great-render.jpg)
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/ssh/assets/xterm-webssh.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ body {

.xterm-decoration-overview-ruler {
margin-right: 5px;
}

body.cp437 .xterm-dom-renderer-owner-1 .xterm-rows div {
margin-bottom: -1px;
}
5 changes: 5 additions & 0 deletions src/ssh/assets/xterm-webssh.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ const TerminalHelper = {
cols: 80,
fixedSize: false,
handedness: 'right',
remoteCharacterSet: 'UTF-8',
}

if (fragment.fontSize) {
Expand All @@ -416,6 +417,10 @@ const TerminalHelper = {
terminalSettings.isMacOS = true;
}

if (fragment.remoteCharacterSet) {
terminalSettings.remoteCharacterSet = fragment.remoteCharacterSet;
}

if (fragment.scrollback) {
terminalSettings.scrollback = fragment.scrollback;
}
Expand Down
5 changes: 5 additions & 0 deletions src/ssh/assets/xterm.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
// Platform :
document.querySelector('body').classList.add(terminalSettings.isMacOS ? 'platform-macos' : 'platform-ios');

// CP437 "hack" :
if ('CP437' == terminalSettings.remoteCharacterSet) {
document.querySelector('body').classList.add('cp437');
}

// Load Fit Addon :
const fitAddon = new FitAddon.FitAddon();
if (!terminalSettings.fixedSize) {
Expand Down

0 comments on commit 3c56c2a

Please sign in to comment.