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....
On 06 Oct 2022, Clive Reuben said the following...
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 d
"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.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,028 |
Nodes: | 17 (0 / 17) |
Uptime: | 25:49:09 |
Calls: | 503,506 |
Calls today: | 17 |
Files: | 133,161 |
U/L today: |
1 files (2K bytes) |
D/L today: |
2,135 files (308M bytes) |
Messages: | 441,939 |
Posted today: | 5 |