Using Python 3.2., wing ide: chr( i ) converts the integer i to a single character or string. How can I know which unicode encoding is being used ? When I execute the following code I get a single character symbol per character, including the protocol symbols such as ETX, ..., the alphanumerics and at 128 + integers I get the special symbols such as ... ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃ etc. Per locale.getpreferredencoding() my linux system is utf-8 and my windows is CP-1252.
It works fine on linux. When I run the same code on windows it gets an exception at \x80 in module cp437.py, def encode( ...) . I assume the encode method is called implicitly?
How can I get chr() to use utf-8 on windows without changing locale ?
for i in range(255): print( chr(i), end="")