Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Perfection is achieved only on the point of collapse. -- C. N. Parkinson


computers / alt.bbs.mystic / python3 not printing extended chars

SubjectAuthor
* python3 not printing extended charsClive Reuben
`* Re: python3 not printing extended charsTravis Mehrer
 `- Re: python3 not printing extended charsClive Reuben

1
python3 not printing extended chars

<3437567960@f104.n142.z1.fidonet.org>

  copy mid

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

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Clive.Reuben@f104.n142.z1.fidonet.org (Clive Reuben)
Newsgroups: alt.bbs.mystic
Subject: python3 not printing extended chars
Date: Thu, 06 Oct 2022 11:09:39 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <3437567960@f104.n142.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="31064"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-Comment-To: g00r00
X-MailConverter: SoupGate-Win32 v1.05
 by: Clive Reuben - Wed, 5 Oct 2022 22:09 UTC

Hey g00r00, I was wondering if you knew of a reason that embedded python3 would
not be able to print extended characters... e.g. if I do:

"write(chr(177))" it will print garbage....

mps files work fine, so I know the system has to be at least partly configured
correctly. And, other than that python3 works as expected.

My setup is:
Mystic 1.12 A48
Rpi 4 4GB
Raspian Bullseye

Let me know if this is something that sounds familiar. Thanks!

-Clive

Re: python3 not printing extended chars

<1274413151@f303.n134.z1.fidonet.org>

  copy mid

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

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.furie.org.uk!news.endofthelinebbs.com!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Travis.Mehrer@f303.n134.z1.fidonet.org (Travis Mehrer)
Newsgroups: alt.bbs.mystic
Subject: Re: python3 not printing extended chars
Date: Thu, 13 Oct 2022 06:53:36 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <1274413151@f303.n134.z1.fidonet.org>
References: <3437567960@f104.n142.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="25863"; 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: Clive Reuben
 by: Travis Mehrer - Wed, 12 Oct 2022 17:53 UTC

On 06 Oct 2022, Clive Reuben said the following...
CR> Hey g00r00, I was wondering if you knew of a reason that embedded
CR> python3 would not be able to print extended characters... e.g. if I do:
CR>
CR> "write(chr(177))" it will print garbage....

I can somewhat confirm this; however, it's worth noting that since Python 3
uses unicode by default chr() doesn't behave the same as in Python 2. chr()
will output the unicode character of that number.

In a terminal you could use something like b'xc0'.decode('cp437') (sorry that's
just the hex code for the character I was testing with) to output an ANSI
character. But this also doesn't seem to output as expected with mpy.

.... My software never has bugs. It just develops random features...

Re: python3 not printing extended chars

<3931754909@f104.n142.z1.fidonet.org>

  copy mid

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

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.neodome.net!csiph.com!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Clive.Reuben@f104.n142.z1.fidonet.org (Clive Reuben)
Newsgroups: alt.bbs.mystic
Subject: Re: python3 not printing extended chars
Date: Fri, 14 Oct 2022 13:14:12 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <3931754909@f104.n142.z1.fidonet.org>
References: <1274413151@f303.n134.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="4741"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-Comment-To: Travis Mehrer
X-MailConverter: SoupGate-Win32 v1.05
 by: Clive Reuben - Fri, 14 Oct 2022 00:14 UTC

On 13 Oct 2022, Travis Mehrer said the following...
TM> On 06 Oct 2022, Clive Reuben said the following...
TM>
TM> CR> Hey g00r00, I was wondering if you knew of a reason that embedded
TM> CR> python3 would not be able to print extended characters... e.g. if I d
TM> CR>
TM> CR> "write(chr(177))" it will print garbage....
TM>
TM> I can somewhat confirm this; however, it's worth noting that since
TM> Python 3 uses unicode by default chr() doesn't behave the same as in
TM> Python 2. chr() will output the unicode character of that number.
TM>
TM> In a terminal you could use something like b'xc0'.decode('cp437') (sorry
TM> that's just the hex code for the character I was testing with) to output
TM> an ANSI character. But this also doesn't seem to output as expected with
TM> mpy.

Hey Travis, That's a very good point and would tend to confirm my suspicion.
Thanks, for the response!

-seeLive

.... The dreams you'd hear if the streets could talk.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor