I would like to show my students the result of opening as macroman/latin1 a file encoded as latin1/macroman [resp.]:
>>> s = u"Tout condamné à mort aura la tête tranchée."
>>> print s.encode("latin1").decode("macroman")
Tout condamnÈ ‡ mort aura la tÍte tranchÈe.
>>> print s.encode("macroman").decode("latin1")
Tout condamn mort aura la tte tranche.
But I'm puzzled by the fact that the second conversion doesn't show any visible non ASCII character. Aren't macroman and latin1 both meant to be byte <-> character bijections?
NB: This is not Python-related, since I can reproduce the behaviour with a text editor.