2008/5/23 Guido van Rossum <[EMAIL PROTECTED]>: > Personally, I can live with it. I rarely generate Japanese text so I > doubt it'll be a problem. I can also change the console encoding and > error handler.
While you rarely generate Japanese text, but I guess you often get non-ASCII text data e.g. SPAM mail in Japanese, Rietveld comments in Spanish, etc. Forecasting encoding of data is hard in these days. > > What I meant by "not writing garbage" was for some app that e.g. acts > like a filter or otherwise produces output (on stdout) for another > program to consume. The other program might not understand \u escapes. > I'd rather trap this when writing, not when reading the garbage > several stages later. > > IOW: > > - stderr (and probably also interactive stdout): set backslashreplace > - stdout (if not interactive): strict > > Default encoding taken from environment in all cases. Fine with me. I'll update the PEP and patch. Thank you! _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com