home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.bbs.mystic      Mystic Sysops are mystical nerds...      11,842 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 11,059 of 11,842   
   Clive Reuben to Travis Mehrer   
   Re: python3 not printing extended chars   
   14 Oct 22 13:14:12   
   
   From: nospam.Clive.Reuben@f104.n142.z1.fidonet.org   
      
   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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca