Michael Foord wrote: >>>> As always: It's better not to rely on such defaults and explicitly >>>> provide the encoding as parameter where possible. >>>> >>>> >>>> >>> Sure. I do worry that developers will still rely on the default behavior >>> assuming that Python 3 "fixes their encoding problems" and cause >>> cross-platform issues. But oh well. >>> >> IMHO, it would be better not to give them that feeling and >> instead have the default for I/O always be UTF-8 (for Python 3.x) >> regardless of what the OS, device or locale says. >> >> > > Well, I agree - but Python 3.1 is now out and uses the platform specific > encoding as the default filesystem encoding. To change that now would be > an incompatible change.
True and that's why we have to educate developers not to rely on those defaults. > Michael > >> Developers could then customize these settings as necessary >> in their applications or via Python environment variables. >> >> Working around UnicodeDecodeErrors is almost always the wrong >> approach. They need to be fixed in the code by deciding what >> to do on a case-by-case basis. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jan 21 2010) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com