Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"You can't get very far in this world without your dossier being there first." -- Arthur Miller


computers / alt.bbs.mystic / High ASCII output with Python 3 - how?

SubjectAuthor
* High ASCII output with Python 3 - how?Sebastian Raase
`* High ASCII output with Python 3 - how?Nicholas Boel
 `* Re: High ASCII output with Python 3 - how?Sebastian Raase
  `- Re: High ASCII output with Python 3 - how?Dan Clough

1
High ASCII output with Python 3 - how?

<2813577820@f8001.n240.z2.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1879&group=alt.bbs.mystic#1879

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Sebastian.Raase@f8001.n240.z2.fidonet.org (Sebastian Raase)
Newsgroups: alt.bbs.mystic
Subject: High ASCII output with Python 3 - how?
Date: Thu, 13 Jul 2023 11:14:19 +1300
Organization: Agency HUB, Dunedin - New Zealand
Message-ID: <2813577820@f8001.n240.z2.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="15693"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-MailConverter: SoupGate-Win32 v1.05
X-Comment-To: All
 by: Sebastian Raase - Wed, 12 Jul 2023 22:14 UTC

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

High ASCII output with Python 3 - how?

<1689284046@f10.n154.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1880&group=alt.bbs.mystic#1880

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Nicholas.Boel@f10.n154.z1.fidonet.org (Nicholas Boel)
Newsgroups: alt.bbs.mystic
Subject: High ASCII output with Python 3 - how?
Date: Thu, 13 Jul 2023 16:32:28 +1300
Organization: Agency HUB, Dunedin - New Zealand
Message-ID: <1689284046@f10.n154.z1.fidonet.org>
References: <2813577820@f8001.n240.z2.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="29608"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-Comment-To: Sebastian Raase
X-MailConverter: SoupGate-Win32 v1.05
 by: Nicholas Boel - Thu, 13 Jul 2023 03:32 UTC

Hello Sebastian,

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

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

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

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

SR> What is the correct way to get a Python 3.x script to output special
SR> 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."

Re: High ASCII output with Python 3 - how?

<2644889703@f8001.n240.z2.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1881&group=alt.bbs.mystic#1881

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Sebastian.Raase@f8001.n240.z2.fidonet.org (Sebastian Raase)
Newsgroups: alt.bbs.mystic
Subject: Re: High ASCII output with Python 3 - how?
Date: Fri, 14 Jul 2023 01:29:57 +1300
Organization: Agency HUB, Dunedin - New Zealand
Message-ID: <2644889703@f8001.n240.z2.fidonet.org>
References: <1689284046@f10.n154.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="31875"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-Comment-To: Nicholas Boel
X-MailConverter: SoupGate-Win32 v1.05
 by: Sebastian Raase - Thu, 13 Jul 2023 12:29 UTC

Hi Nicholas,

NB>> What is the correct way to get a Python 3.x script to output special
NB>> characters in Mystic?
NB>
NB> If I remember right, Python 3.x doesn't work all that well with Mystic.
NB> Try using Python 2.x instead, as I believe that's what was used when
NB> 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

Re: High ASCII output with Python 3 - how?

<689305546@f1.n770.z4095.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1882&group=alt.bbs.mystic#1882

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Dan.Clough@f1.n770.z4095.fidonet.org (Dan Clough)
Newsgroups: alt.bbs.mystic
Subject: Re: High ASCII output with Python 3 - how?
Date: Thu, 13 Jul 2023 21:13:00 +1300
Organization: Agency HUB, Dunedin - New Zealand
Message-ID: <689305546@f1.n770.z4095.fidonet.org>
References: <2644889703@f8001.n240.z2.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="3149"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-Comment-To: Sebastian Raase
X-MailConverter: SoupGate-Win32 v1.05
 by: Dan Clough - Thu, 13 Jul 2023 08:13 UTC

-=> Sebastian Raase wrote to Nicholas Boel <=-

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

SR> I haven't found any (current) source code for Mystic, so I can't
SR> 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

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor