• ANSI Corruption when from ENiGMA

    From NuSkooler@21:1/121 to g00r00 on Saturday, August 19, 2017 10:18:46
    g00r00 --

    I've added ANSI FSE support to ENiGMA 1/2 recently. When replying to ANSI messages coming from Mystic, the reply works well in enig, but shows up corrupted in Mystic (and maybe other ANSI supporting boards... not yet sure).

    Can you take a look & see what I'm doing wrong or could do better? Here is a sample .pkt file:

    http://s000.tinyupload.com/?file_id=85046989931615034381

    Thanks!
    Nu





    --- ENiGMA 1/2 v0.0.7-alpha (linux; x64; 6.10.3)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From bcw142@21:1/145 to NuSkooler on Saturday, August 19, 2017 16:57:47
    On 08/19/17, NuSkooler said the following...
    I've added ANSI FSE support to ENiGMA 1/2 recently. When replying to ANSI messages coming from Mystic, the reply works well in enig, but shows up corrupted in Mystic (and maybe other ANSI supporting boards... not yet sure).

    It's hard to do ANSI correctly, even Mystic doesn't handle it well
    with examples like yours which was quoting an ANSI logo. Mystic does
    it better because it has a clue about ESC sequences and what you can
    get rid of color codes and attributes. They all take the same form:
    ESC[#(;#)m. Nothing else starts with ESC[ & ends in m, but everything
    starts with ESC[ (1BH 5BH) making it harder to deal with.
    The 'rules' are shown at:
    http://bluesock.org/~willkg/dev/ansi.html

    ESC[37m is white text. Some text follows and it ends with [5C or right 5 spaces, then two CRLF pairs (newlines).
    00000000 1B 5B 33 37 6D 68 74 74 70 3A 2F 2F 62 63 77 31
    .[37mhttp://bcw1
    00000010 34 32 2E 7A 61 70 74 6F 2E 6F 72 67 1B 5B 35 43
    42.zapto.org.[5C
    00000020 0D 0A 0D 0A ....

    The true result of all that is white text that shows:
    http://bcw142.zapto.org

    (ends here from 2 CRLF pairs)
    Mystic strips the color codes to put a color in for sender and receiver.

    --- Mystic BBS v1.12 A33 (Raspberry Pi/32)
    * Origin: Mystic Pi BBS bcw142.zapto.org (21:1/145)
  • From NuSkooler@21:1/121 to bcw142 on Saturday, August 19, 2017 16:26:06


    On Saturday, August 19th bcw142 was heard saying...
    It's hard to do ANSI correctly, even Mystic doesn't handle it well with examples like yours which was quoting an ANSI logo. Mystic does it better because it has a clue about ESC sequences and what you can get rid of color codes and attributes. They all take the same form: ESC[#(;#)m. Nothing else starts with ESC[ & ends in m, but everything starts with ESC[ (1BH 5BH) making it harder to deal with. The 'rules' are shown at: http://bluesock.org/~willkg/dev/ansi.html

    Thanks for the response - I don't need help with ESC codes though. ENiG fully supports them (hence the ANSI in FSE and ANSI quote builder). I have valid ANSI/ESC in a message and Mystic isn't showing it correctly.

    Showing ANSI in FSE can be a real pain. I imagine Mystic just doesn't like something particular about how I'm building the message.

    For ANSI in FSE, enigma pre-processes the original input into a canvas -- normalizing movement, line wrapping, etc. into essentially a grid containing either blank space or SGR + character. When you quote, lines from this buffer are appended to the message. This displays just fine elsewhere, but Mystic seems to wrap the lines / garble it. ...probably just doesn't expect something I'm doing (and could perhaps do differnet to be more "BBS compatible")





    --- ENiGMA 1/2 v0.0.7-alpha (linux; x64; 6.10.3)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From Pequito@21:1/126 to NuSkooler on Saturday, August 19, 2017 18:58:35
    On 08/19/17, NuSkooler said the following...

    g00r00 --

    I've added ANSI FSE support to ENiGMA 1/2 recently. When replying to ANSI messages coming from Mystic, the reply works well in enig, but shows up corrupted in Mystic (and maybe other ANSI supporting boards... not yet sure).

    Can you take a look & see what I'm doing wrong or could do better? Here
    is a sample .pkt file:

    One thing to note make sure the max width is 79 that is what fixed it when working with Mystic and possibly other systems.

    Cheers!
    Pequito

    --- Mystic BBS v1.12 A34 (Linux/32)
    * Origin: Twinkle BBS # (21:1/126)
  • From apam@21:1/125 to NuSkooler on Monday, August 21, 2017 12:56:20


    On Aug 20th 2:19 am NuSkooler said...
    I've added ANSI FSE support to ENiGMA 1/2 recently. When replying to ANSI messages coming from Mystic, the reply works well in enig, but shows up corrupted in Mystic (and maybe other ANSI supporting boards... not yet sure).

    Just so you know, gooroo said something about he's moving house (or painting house or something i forget.. :) but it might be a little while before he answers.

    Anyway, I just wanted to point out that I don't think mystic quotes ansi at all. Every time I've seen someone quote an ansi that is using a mystic system, it's stripped out all the colour and appears to be plain ascii (but with block characters or whatever).

    Now, why it wouldn't take your perfectly fine ansi with quotes infront of it and render it as ansi is a mystery. Perhaps it's because of the way it handles quotes, I know when reading on agency quotes appear coloured....

    Either way, if you want to delve into it more before gooroo gets back to you there's always the old opensource mystic you could peek at, though I understand
    why you might not want to do that :)

    Andrew



    --- ENiGMA 1/2 v0.0.7-alpha (linux; x64; 6.11.2)
    * Origin: Exotica - exoticabbs.com:8888 (21:1/125)
  • From NuSkooler@21:1/121 to apam on Sunday, August 20, 2017 21:03:53


    On Sunday, August 20th apam muttered...
    Either way, if you want to delve into it more before gooroo gets back to you there's always the old opensource mystic you could peek at, though I understand why you might not want to do that :)

    Yeah, went that path, but I think the source is too old (or I'm missing something).

    Maybe I'll add the option to allow quoting ANSI as ASCII later if it's not going to be supported by other systems.




    --- ENiGMA 1/2 v0.0.7-alpha (linux; x64; 6.10.3)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From bcw142@21:1/145 to apam on Monday, August 21, 2017 07:18:38
    On 08/21/17, apam said the following... ap> Jus
    t so you know, gooroo said something about he's moving house (or
    painting house or something i forget.. :) but it might be a little whil
    e ap> before he answers. ap>Yes
    , moving and has a job that should last till Octob
    er before he has muchtime. ap>
    Anyway, I just wanted to point out that I don't think mystic quotes a
    nsi ap> at all. Every time I've seen someone quote an ansi t
    hat is using a ap> mystic system, it's stripped out all the
    colour and appears to be plain ap> ascii (but with block cha
    racters or whatever). ap> It does,
    but strips the color to color it like it does all other email
    . Ifyou want the full exact copy you have to
    save it (X) with .ans and put it
    back with (U) upload. Then edit it as y
    ou want in (D) draw mode.
    Now, why it wouldn't take your perfectly fine ansi with quote
    s infront ap> of it and render it as ansi is a
    mystery. Perhaps it's becauseof the ap> way it handles quot
    es, I know when reading on agency quotesappear ap> coloured
    .... ap> ap> Either way, if you want to delve into
    it more before gooroo gets back to ap> you there's always th
    e old opensource mystic you could peek at, though I ap> unde
    rstand why you might not want to do that :) ap> ap>
    AndrewLike other BBS it tends to refo
    rmat quoted stuff in a bad way with long linesas above
    . All BBS I've see have that issue
    . That will really mess with thelook of an
    ANSI.Come play one of the seldom 3D du
    ngeon games now available on Twinkle withmany different sele
    ctions to choose from!Subj: [ANSI] Dungeon Master
    Date: 08J o h1 nD a i l e y ' sBa
    se: FSÜÜÜÜÜÜÜ ÜÜÜ ÜÜÜ ÜÜÜ ÜÜ
    Ü ÜÜÜÜÜÜÜÜ ÜÜÜÜÜÜÜ ÜÜÜÜÜÜÜÜ
    ÜÜÜ ÜÜÜÛÜÜÜÜÜÛ Û
    Û Û Û ÛÛÛßÜ ÛÛ
    Û ÛÜÜÜÜÜÜÛ ÛÜÜÜÜÜÛ Û
    ÜÜÜÜÜÜÛ ÛÛÛßÜ ÛÛÛ
    ÜÜÜ ÜÜÜ Û Û Û Û
    ÛÛÛÜÞÝÛÛÛ ÜÜÜ
    ÜÜÜÜÜÜ ÜÜÜ ÜÜÜ ÛÛ
    ÛÜÞÝÛÛÛ ±
    ÛÛÛ ÛÛÛ ÛÛÛ
    ÛÛÛ ÛÛÛ ß ÛÛÛ ÛÛ
    Û ÛßßÛ ÛÛÜÜÜÛ
    ÛÛÛ ÛÛÛ ÛÛÛ ß
    ÛÛÛ ° °± ÛÛÛ
    ÛÛÛ ÛÛÛ ÛÛÛ
    ÛÛÛ ² ÛÛÛ ÛÛ
    Û ßÛÛÛ ÛÛÛÛÛÛ
    ÛÛÛ ÛÛÛ ÛÛÛ
    ² ß±° ÛÛßßßßÛÛ ÛÛßß
    ßßÛÛ ÛÛÛ ² ÛÛÛ
    ÛÛßßßßÛÛ ÛÛßßßßÛ
    ÛÛßßßßÛÛ ÛÛÛ ° Û
    ÛÛ ² ß±° ßßßßßßßß ßßßßßßßß ßßß
    ° ßßß ßßßßßßßß ßßßßßßß ßßßßßßßß ßßß ßßß
    ßÛ ß±°ß ßßß °°°°±±±±±°° °± °
    ݰ°±±° °°°°°°ÜÜÜ
    ° Ü Ü Ü°±²ÜÜÜÜßßß°°°°°°
    °±²ÝÞ °°°°Þ±°°°° °
    ±°°°°°Üܱ±²²±° It
    Û Û Þ°±²ÛÛÛß ÜÜ ßßßß°±±ßß
    ²±°°±² ²±±±±°°°±°°°ÜÜßÛÛÛÛÛÛÛ²±
    ° ° Û° Ý °±²ÛÛÛÛ Û
    ßÛ Þ²±°Üß²²±±²
    ß ß²²²²ß°±°ÜÜ Û
    ß Û ÛÛÛÛÛ²±±° is Û±Û
    Þ ß°°±±²²Ü ßß ÜÛÛÛÛ
    ²±°Ü ßß ²²²²ßß ±° ÜÜ
    °±²ÛÛÜßßÜÛÛÛÛ²²±±°ß
    °°±±ÜßÜÜ ßßß°±²Û²±°
    ßßßßß ÜÜÜ Ü²²²²²±±°°²²²Ü ßß°°±²²²
    ÛÛÛÛÛÛ²±°ßßß here. ° °°
    °±±ÜÜßßÜÜÜÜÜÜÜÜÜܱ²±°
    ²±°ÛÛ±±° ° °±±±Ü ²±° ßßßßßß
    Ü °°°°±²² ÜÜÜ ß ÜÜÜ ÜÜÜÜÜÜÜ ÜÜÜÜÜ
    ÜÜ ÜÜÜÜÜÜÜÜÜ ÜÜÜÜÜÜÜ ÜÜÜÜÜÜÜÜ
    Ü ß°°°° ÛÛÛßÜßÛÛÛ Û
    ÜÜÜÜÜÛ ÛÜÜÜÜÜÛ ÛÜÜÜÜÜÜÜÛ
    ÛÜÜÜÜÜÛ ÛÜÜÜÜÜÜÛ ²²±°
    ÜÜÜÜÛÛÛÜÛÜÛÛ
    Û ÜÜÜÜÜÜÜ ÜÜÜÜÜÜÜ ÜÜÜ
    Ü ÜÜÜÜÜÜ ÜÜÜÜÜÜÜܲ±°° °±±
    ±±²²²²² ÛÛÛ ß ÛÛÛ ÛÛ
    ÜÜÜÛÛ ÛÜÜÜÜÛÛ Û
    ÛÛ ±± ÛÛÜÜÜÛ Û
    ÛÜÜÜÛÜÛ ²²²±±±°° °
    ÛÛÛ ÛÛÛ ÛÛÛ
    ÛÛÛÛÛÛ ÛÛÛ
    ÛÛÛÛÛÛ ÛÛÛ
    ÛÛÛ ÛÛÛ ÛÛÛ Û
    ÛÛ ÛßßßßÛÛ ÛÛÛ
    ÛÛßßßßÛ ÛÛÛ ÛÛ
    ßÛßßß ßßß ßßß ßßß ßßßßßßß ßßß ßß
    ßßßßß ßßß ßßßß--- Mystic BBS v1.12 A34 (Linux/32)

    * Origin: Twinkle BBS # (21:1/126)
    --- Mystic BBS v1.12 A33 (Raspberry Pi/32)
    * Origin: Mystic Pi BBS bcw142.zapto.org (21:1/145)
  • From Avon@21:1/101 to apam on Monday, August 21, 2017 18:52:37
    On 08/21/17, apam pondered and said...

    Anyway, I just wanted to point out that I don't think mystic quotes ansi at all. Every time I've seen someone quote an ansi that is using a
    mystic system, it's stripped out all the colour and appears to be plain ascii (but with block characters or whatever).

    I think it may be if the base is set to allow ANSI... just a guess..

    --- Mystic BBS v1.12 A34 (Windows/32)
    * Origin: Agency BBS | telnet://agency.bbs.geek.nz (21:1/101)
  • From NuSkooler@21:1/121 to bcw142 on Monday, August 21, 2017 09:28:28


    On Monday, August 21st bcw142 muttered...
    It does,but strips the color to color
    it like it does all other email. If
    you want the full exact copy you have to save it
    (X) with .ans and put it
    back with (U) upload.
    Then edit it as you want in (D) draw
    mode.

    Ah that helps, thanks. Is WWIV the same way? Both display ANSI just fine, neither seem to display ANSI when it's qutoed (which is odd... cuz it's still just ANSI...)

    If I could ge them to detect that it's "just an ANSI image", they'd prob work better -- but I imagine the word wrapping wouldn't work -- enig does some hackery to get that to work.

    In the end maybe I'll have to just quote as ASCII by default... ugg.



    --- ENiGMA 1/2 v0.0.7-alpha (linux; x64; 6.10.3)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From dream master@21:1/163 to NuSkooler on Monday, August 21, 2017 11:45:34
    On 08/19/17, NuSkooler said the following...
    g00r00 --
    I've added ANSI FSE support to ENiGMA 1/2 recently. When replying to ANSI messages coming from Mystic, the reply works well in enig, but shows up corrupted in Mystic (and maybe other ANSI supporting boards... not yet sure).
    Can you take a look & see what I'm doing wrong or could do better? Here
    is a sample .pkt file:

    save it at 79 columns

    |08 .|05ú|13ù|15Dr|07e|08am Ma|07st|15er|13ù|05ú|08.
    |08 øù|05ú|13ùø |13øù|05ú|08ùø
    |11 DoRE|03!|11ACiDiC|03!|11Demonic |08[|15dreamland|09.|15darktech|09.|15org|08]

    --- Mystic BBS v1.12 A34 (Windows/64)
    * Origin: |08--[|15!|07dreamland BBS dreamland.darktech.org (21:1/163)
  • From NuSkooler@21:1/121 to dream master on Monday, August 21, 2017 16:46:34


    On Monday, August 21st dream master was heard saying...
    save it at 79 columns

    The sample in that pkt file is already < 79 cols per line. Updated examples are
    the same other than I added a little more to the prefix of the message (ANSI reset/etc. similar to original ANSI postings from Mystic) and encode explicitly
    with CP437 as boards were choaking on ANSI as UTF-8 =(





    --- ENiGMA 1/2 v0.0.7-alpha (linux; x64; 6.10.3)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From g00r00@21:1/108 to NuSkooler on Friday, August 25, 2017 12:18:19
    I've added ANSI FSE support to ENiGMA 1/2 recently. When replying to ANSI messages coming from Mystic, the reply works well in enig, but shows up corrupted in Mystic (and maybe other ANSI supporting boards... not yet sure).

    Are you post-processing the ANSI so its saved at no more than 79 columns, and if you are, does that 79 character saved ANSI properly open up in TheDraw, AcidDraw, etc? You can just truncate lines at 79 characters you have to totally post-process it and rebuild the ANSI.

    That was the most annoying part of adding in that ANSI stuff when I did it.

    What I did was I had it save an .ANS for each message at 79 characters whenever I saved the message, so basically the .ANS contained the identical content that was saved in the database.

    Then I would load it all up in various viewers and editors to make sure the ANSI is properly reproduced by everything, as well as viewable in terminals.

    It took me a bit to get it right and after I did, I tested it in some BBS software like Telegard and WWIV which doesn't directly support ANSI, but will spit out the raw 79 characters per line, meaning it actually views properly by default because it just dumps message content.

    --- Mystic BBS v1.12 A35 (Windows/32)
    * Origin: Sector 7 [Mystic BBS WHQ] (21:1/108)
  • From NuSkooler@21:1/121 to g00r00 on Friday, August 25, 2017 12:45:42


    On Friday, August 25th g00r00 was heard saying...
    Are you post-processing the ANSI so its saved at no more than 79 columns,

    See prev reply in other general

    On Friday, August 25th g00r00 muttered...
    It took me a bit to get it right and after I did, I tested it in some BBS software like Telegard and WWIV which doesn't directly support ANSI, but will spit out the raw 79 characters per line, meaning it actually views properly by default because it just dumps message content.

    Currently I don't do the < 79 thing. I do normalize the ANSI though, so I can add that to the alg.

    Do you mind sharing some code or at least any tips on what "getting it right" entails? What I'm currently doing works as far as displaying properly in terminals, Pablo, etc. but I'll be making quite a few adjustments to fit within
    < 79.




    --- ENiGMA 1/2 v0.0.7-alpha (linux; x64; 6.10.3)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From g00r00@21:1/108 to NuSkooler on Friday, September 01, 2017 18:06:04
    Do you mind sharing some code or at least any tips on what "getting it right" entails? What I'm currently doing works as far as displaying properly in terminals, Pablo, etc. but I'll be making quite a few adjustments to fit within < 79.

    What I did was to take some ANSIs and load them up in TheDraw inside of a DosBox. I saved them with a line length of 79 characters and then looked at the ANSI in a text editor to see what it looks like.

    ANSI saved in this mode is what your ANSI should look like after you save it.

    Basically the idea is to use a down and up cursor movement if you ever hit 79 characters in the output of the ANSI (but aren't at the end of the line from an ART perspective).

    So I think what happens is the "new line" actually goes through, but then your cursor location code pops the cursor right back up to the previous line where you were before the 79 character wrap came into play. At this point the cursor is in the right spot and you're on a "new line" as far as the output goes.

    I think just looking at a TheDraw ANSI saved in 79 line length will provide
    the best examples of what I mean.

    --- Mystic BBS v1.12 A35 (Windows/32)
    * Origin: Sector 7 [Mystic BBS WHQ] (21:1/108)