IDLE "Codepage" Switching?

Stephen Tucker stephen_tucker at sil.org
Tue Jan 17 07:47:29 EST 2023


I have four questions.

1. Can anybody explain the behaviour in IDLE (Python version 2.7.10)
reported below? (It seems that the way it renders a given sequence of bytes
depends on the sequence.)

2. Does the IDLE in Python 3.x behave the same way?

3. If it does, is this as it should behave?

4. If it is, then why is it as it should behave?
==============================
>>> mylongstr = ""
>>> for thisCP in range (157, 169):
        mylongstr += chr (thisCP) + " "


>>> print mylongstr
ン ゙ ゚ ᅠ ᄀ ᄁ ᆪ ᄂ ᆬ ᆭ ᄃ ᄄ
>>> mylongstr = ""
>>> for thisCP in range (158, 169):
        mylongstr += chr (thisCP) + " "


>>> print mylongstr
ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨
>>> mylongstr = ""
>>> for thisCP in range (157, 169):
        mylongstr += chr (thisCP) + " "


>>> print mylongstr
ン ゙ ゚ ᅠ ᄀ ᄁ ᆪ ᄂ ᆬ ᆭ ᄃ ᄄ
==============================

Stephen Tucker.


More information about the Python-list mailing list