python3 - the hardest hello world ever ? at at
Tue Oct 14 14:41:40 CEST 2008

Hi Helmut, All,

> do I miss something (I do hope so) or is switching to Python3
> really hard for Latin1-users?

It's as complicated as ever -- if you have used unicode strings
in the past (as the 3.0 strings now are always unicode strings).

> # sys.setfilesystemencoding('latin1')
This cares about the character encoding in filenames, not
in file content.

sys.setdefaultencoding('iso-8859-1') # or 'latin1'
would do the job, but only in After
initializing, the function is no longer available.

And using it in is sort of discouraged.

IMHO the assumptions the typical Python installation makes
about the character encoding used in the system are much too
conservative. E.g. under Windows it should it use

Then a lot of things would work out of the box. Of course
including some methods to shoot yourself in the foot, which
you are prevented from by the current behaviour.


More information about the Python-list mailing list