[Python-3000] PEP 3138- String representation in Python 3000

Atsuo Ishimoto ishimoto at gembook.org
Fri May 23 17:05:37 CEST 2008


2008/5/23 Guido van Rossum <guido at python.org>:
> 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!


More information about the Python-3000 mailing list