On 1/23/2010 7:53 AM, Antoine Pitrou wrote:
Terry Reedy<tjreedy<at>  udel.edu>  writes:

If the current guess is based on a mistaken assumption -- that it is
giving the user what the user asked for -- it might be reconsidered. I
personally would prefer that the default file encoding for Python 3 be
utf-8 on any machine my code runs on unless *I* or the *user*, rather
than some anonymous third party, ask otherwise. That would make files
guaranteed portable unless asked to not be.

Why do you think utf-8 is "guaranteed portable" and other encodings are not?
All encodings are portable,

Dreadfully rong. In general, the default encoding on my Windows *does not work* on Python3 strings but causes
UnicodeEncodeError:....
If the text is not written to the file, it is completely non-portable.

> the issue at hand is to select the one which will be
expected by other tools.

If the text is not written to a file, it does not matter what the other tool expects. Anyway, any tool that does not accept a complete unicode encoding is not really compatible with Python3 strings.

If this was only about Python then, yes, we could
happily settle on utf-8 as a default for all systems.

OpenOffice on Windows prompts me to select an encoding to use for decoding. utf-8 is one of the choices, so it can read any Python3 string written out that way.

I disagree that the default behavior for a basic function should be to not work.

Terry Jan Reedy

_______________________________________________
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

Reply via email to