• Beyond ANSI

    From Doctor Who@VERT/THE5THD to All on Friday, March 11, 2016 15:11:59
    I was wondering. Although I certainly want to retain legacy ANSI compatibility, maybe it would be good to look a bit to the present and maybe to the future a bit with BBS software. Most people aren't going to be running DOS these days, and the terminal software they use to connect to the BBS is likely to support UTF8 and screens bigger than 80x24. Would it be possible (or is it already possible) to have Synchronet detect the capabilities of a terminal and choose to use 80x24 cp437/ANSI files for those terminals and use larger sizes like 160x48 (or other arbitrary sizes) and UTF8 encoded files for users with larger terminals?

    ---
    þ Synchronet þ The 5th Dimension: the5thd.synchro.net
  • From Nightfox@VERT/DIGDIST to Doctor Who on Friday, March 11, 2016 15:31:49
    I was wondering. Although I certainly want to retain legacy ANSI compatibility, maybe it would be good to look a bit to the present and maybe to the future a bit with BBS software. Most people aren't going
    to
    be running DOS these days,

    There is terminal software and BBS packages (including Synchronet) that are available for Windows and Linux. So people don't really need to use DOS to connect to a BBS.

    and the terminal software they use to connect
    to the BBS is likely to support UTF8 and screens bigger than 80x24.
    Would
    it be possible (or is it already possible) to have Synchronet detect
    the
    capabilities of a terminal and choose to use 80x24 cp437/ANSI files
    for
    those terminals and use larger sizes like 160x48 (or other arbitrary sizes) and UTF8 encoded files for users with larger terminals?

    I'm not sure about cp437 and UTF8, but Synchronet does detect the user's terminal size. Synchronet mods written in JavaScript can make use of large terminal sizes. SyncTerm allows configuring the terminal size, so with SyncTerm it's fairly easy to have a terminal larger than 80x24.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Doctor Who on Friday, March 11, 2016 16:59:04
    Re: Beyond ANSI
    By: Doctor Who to All on Fri Mar 11 2016 03:11 pm

    I was wondering. Although I certainly want to retain legacy ANSI compatibility, maybe it would be good to look a bit to the present and maybe to the future a bit with BBS software. Most people aren't going to be running DOS these days, and the terminal software they use to connect to the BBS is likely to support UTF8 and screens bigger than 80x24. Would it be possible (or is it already possible) to have Synchronet detect the capabilities of a terminal and choose to use 80x24 cp437/ANSI files for those terminals and use larger sizes like 160x48 (or other arbitrary sizes) and UTF8 encoded files for users with larger terminals?

    Synchronet already detects larger terminals (using ANSI cursor position reporting). Most terminals suitable for BBSing (e.g. support file transfers, ANSI escape sequencse) do not support UTF-8.

    digital man

    Synchronet "Real Fact" #80:
    Vertrauen has had the FidoNet node number 1:103/705 since 1992.
    Norco, CA WX: 49.8øF, 94.0% humidity, 8 mph ESE wind, 0.09 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Trailboss@VERT/BR-RANCH to Doctor Who on Friday, March 11, 2016 15:40:16
    Re: Beyond ANSI
    By: Doctor Who to All on Fri Mar 11 2016 03:11 pm

    I was wondering. Although I certainly want to retain legacy ANSI compatibili maybe it would be good to look a bit to the present and maybe to the future bit with BBS software. Most people aren't going to be running DOS these days and the terminal software they use to connect to the BBS is likely to suppor UTF8 and screens bigger than 80x24. Would it be possible (or is it already possible) to have Synchronet detect the capabilities of a terminal and choos to use 80x24 cp437/ANSI files for those terminals and use larger sizes like 160x48 (or other arbitrary sizes) and UTF8 encoded files for users with larg terminals?


    This would be nice I think as there are getting to be lots of changes even with Microsoft. Their are going back to a more terminal package on their servers and also have put ansi back in windows 10. Supporting bigger screen sizes and encodes I think would be nice.

    Michael Deig
    Sysop - Bufkin Ridge Ranch
    ---
    þ Synchronet þ BR-Ranch BBS - telnet://bbs.br-ranchbbs.com http://www.br-ranch.com
  • From Kevinl@VERT to Doctor Who on Sunday, March 13, 2016 00:58:00
    Doctor Who wrote to All <=-

    Would it be possible (or is it already possible) to have
    Synchronet detect the capabilities of a terminal and choose to use
    80x24 cp437/ANSI files for those terminals and use larger sizes like 160x48 (or other arbitrary sizes) and UTF8 encoded files for users with larger terminals?

    I've written one of the terminals that can do multiple codepages and
    emulations (qodem). This will get more technical, but perhaps it will
    be useful.

    Detecting screen size is usually already done by modern BBS systems,
    typically by setting the cursor to a "large" row/column and issuing
    DSR 6 to have the terminal report its cursor position. However, there
    is another way to figure out the screen size without actually using a ANSI/VT100 sequence, using features of the underlying connection
    protocol. Telnet has the Negotiate About Window Size option, ssh has
    the window-change message, and rlogin has a screen/window size
    exchange that requires the BBS side to send TCP out-of-band data
    (which has a strong chance to fail due to differences in how Windows,
    BSD, and Linux handle their sockets layer, see RFC 6093). Both
    options (DSR and the protocol specific stuff) work rather well, and
    can even handle resizing the screen on-the-fly. So that part is
    mostly done.

    Detecting UTF-8 however is a bit harder. Unicode formally defines the character encoding to occur "above" the connection layer and "beneath"
    the emulation layer, so one could for example have UTF-8 encoding with
    DOS ANSI.SYS and it would work as you would hope it to. But the
    emulation has no idea that it is speaking UTF-8 (with yet another
    exception for X10 mouse reporting which by default can trash a UTF-8
    stream). There are also no control sequences in VT100 to figure out
    the encoding or codepage, but one could easily add a new constant to
    the VT100 Device Attributes function to identify it (getting agreement
    from all the terminal authors OTOH would be very hard, especially
    given that some of the favorite BBS terminals are now abandonware and
    cannot be updated). But one can look again at the connection protocol
    layer, and telnet and ssh both provide means to pass environment
    variables. (rlogin has nothing useful.) Hence the BBS could look at
    the LANG variable to see if it is "en_US.UTF-8" instead of merely
    "en_US", and switch to UTF-8 encoding appropriately (but this doesn't
    help it pick an 8-bit codepage, e.g. CP437 vs KOI8-R for example).
    Further ironically, even though telnet _can_ pass LANG, most telnetd
    servers are hard-wired in the code not to: they will only pass a few
    variables through and LANG is never one of them (nor are JOB, ACCT,
    PRINTER, and SYSTEMTYPE, despite those being called out by name in RFC
    1572 as well known variables). I am so used to telnetd not handling
    LANG in fact that just verifying its behavior to write this post
    showed me that my own telnet server code in my jexer library was
    broken too! So I fixed that just now. :-) Happily enough though ssh
    tends to be configured to pass LANG correctly.

    So to recap, the screen size is working fine right now, but the UTF-8
    detection would only work out-of-the-box for ssh. BBSes could check
    LANG for telnet, but should probably also have a fallback because it
    will often not work.


    ... MultiMail, the new multi-platform, multi-format offline reader!
    --- MultiMail/Linux v0.49
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From James Coyle@VERT to Kevinl on Sunday, March 13, 2016 20:16:14
    Detecting UTF-8 however is a bit harder. Unicode formally defines the character encoding to occur "above" the connection layer and "beneath"
    the emulation layer, so one could for example have UTF-8 encoding with
    DOS ANSI.SYS and it would work as you would hope it to. But the

    You are right there isn't a good way to do this. For what its worth...

    What Mystic BBS does is it tries to request and read the termtype presented by the telnet protocol, and it tries to make an assumption on defaults based on what is sent back.

    For example, if "LINUX" is returned, it assumes UTF8 and a certain delete/backspace key behavior. The opposite would be true for an "ansi" result.

    The configuration also allows for a default codepage to be assumed prior to any of this detection (for cases when no resonable guess can be made), and the user can optionally be asked to confirm their encoding...

    Its not a clean way to handle it, but thats how I do the UTF8 stuff.

    --- Mystic BBS v1.12 A8 (Windows)
    * Origin: Sector 7 [Mystic BBS WHQ] (1:129/215)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net