• High ASCII output with Python 3 - how?

    From Sebastian Raase@2:240/8001 to All on Thu Jul 13 11:14:18 2023
    Hi all,

    I am looking into developing a DOOR using Python 3.x for Mystic.

    However, I cannot use write() or writeln() to output a string containing special characters (such as „ [ae] ” [oe] á [sz]), they will display incorrectly. The BBS is running in CP437 and so are clients.

    If I encode the characters manually and call write() or writeln() using a bytestring, the user gets disconnected immediately. This may be a bug.

    What is the correct way to get a Python 3.x script to output special
    characters in Mystic?

    Best Regards,
    Sebastian

    --- Mystic BBS v1.12 A43 2019/03/03 (Windows/32)
    * Origin: BlackICE BBS (BlackICE.BBSindex.com:23) (2:240/8001)
  • From Nicholas Boel@1:154/10 to Sebastian Raase on Thu Jul 13 16:32:28 2023
    Hello Sebastian,

    On Thu Jul 13 2023 11:14:18, you wrote to All:

    I am looking into developing a DOOR using Python 3.x for Mystic.

    However, I cannot use write() or writeln() to output a string
    containing special characters (such as „ [ae] ” [oe] á [sz]), they
    will display incorrectly. The BBS is running in CP437 and so are
    clients.

    If I encode the characters manually and call write() or writeln()
    using a bytestring, the user gets disconnected immediately. This may
    be a bug.

    What is the correct way to get a Python 3.x script to output special characters in Mystic?

    If I remember right, Python 3.x doesn't work all that well with Mystic. Try using Python 2.x instead, as I believe that's what was used when support for Python was initially added.

    Regards,
    Nick

    ... "Take my advice, I don't use it anyway."
    --- GoldED+/LNX 1.1.5-b20230205
    * Origin: thePharcyde_ distribution system (Wisconsin) (1:154/10)
  • From Sebastian Raase@2:240/8001 to Nicholas Boel on Fri Jul 14 01:29:56 2023
    Hi Nicholas,

    What is the correct way to get a Python 3.x script to output special
    characters in Mystic?

    If I remember right, Python 3.x doesn't work all that well with Mystic. Try using Python 2.x instead, as I believe that's what was used when support for Python was initially added.

    Unfortunately, Python 2.x is very much dead by now and the libraries I am planning to use don't support it. So that won't work. Thanks for confirming
    my suspicions, though...

    It would be really nice if Mystic could take the incoming strings (which, in Python 3.x, are always UTF-8) and convert them to the correct codepage. Same for handling input. That way, all the encoding mess would be taken care of outside the plugins. Dreaming is still allowed, isn't it?

    I haven't found any (current) source code for Mystic, so I can't fix it.

    Best Regards,
    Sebastian

    --- Mystic BBS v1.12 A43 2019/03/03 (Windows/32)
    * Origin: BlackICE BBS (BlackICE.BBSindex.com:23) (2:240/8001)
  • From Dan Clough@1:135/115 to Sebastian Raase on Thu Jul 13 21:13:00 2023
    Sebastian Raase wrote to Nicholas Boel <=-

    It would be really nice if Mystic could take the incoming strings
    (which, in Python 3.x, are always UTF-8) and convert them to the
    correct codepage. Same for handling input. That way, all the
    encoding mess would be taken care of outside the plugins.
    Dreaming is still allowed, isn't it?

    I haven't found any (current) source code for Mystic, so I can't
    fix it.

    Mystic is not open-source, and the author is largely.... absent.



    ... Internal Error: The system has been taken over by sheep at line 19960
    === MultiMail/Linux v0.52
    --- SBBSecho 3.20-Linux
    * Origin: Palantir * palantirbbs.ddns.net * Pensacola, FL * (1:135/115)