I'm working in the windows console and I can not print the superscript digits. This is what I get:
>>> '¹²³⁴⁵⁶⁷⁸⁹'
'1²345678?'
>>> for i in '¹²³⁴⁵⁶⁷⁸⁹': print(i, i.encode())
...
1 b'1' # expect b'\x00\xb9' (U+00B9)
² b'\xc2\xb2' # expect b'\x00\xb2' (U+00B2)
3 b'3' # expect b'\x00\xb3' (U+00B2)
4 b'4' # expect b'\x20\x74' (U+2074)
5 b'5' # expect b'\x20\x75' (U+2075)
6 b'6' # expect b'\x20\x76' (U+2076)
7 b'7' # expect b'\x20\x77' (U+2077)
8 b'8' # expect b'\x20\x78' (U+2078)
? b'?' # expect b'\x20\x79' (U+2079)
I tried to set the environment variable PYTHONIOENCODING this way
set PYTHONIOENCODING=utf-8
but what I get is this
>>> '¹²³⁴⁵⁶⁷⁸⁹'
File "<stdin>", line 0
^
SyntaxError: 'utf-8' codec can not decode bytes 0xfd in position 2: invalid start byte
the problem in this case is the '²', in fact replacing it I get
>>> '¹2³⁴⁵⁶⁷⁸⁹'
'12345678?'
How can I fix? Thanks!