Hi folks, Is this thread reaching a conclusion yet? I am hoping I can soon accept some variant of the following:
1. repr() returns a Unicode string containing only printable Unicode characters, using \x\u\U escapes for characters that are not considered printable according to some version of the Unicode standard augmented with some Python practicality, but unaffected by platform or locale. This can be implemented efficiently, without having to load the whole Unicode database, at least for strings containing only a large subset of the Unicode character set (e.g. all of UCS2, and possibly whole ranges of UCS4). 2. If you don't want any non-ASCII printed to a file, set the file's encoding to ASCII and the error handler to backslashescape. But as I haven't followed the thread I may be way off. Is Martin's proposal to allow forcing the default stdin/stdout/stderr encodings through environment variables related? (It should allow for setting the error handler too.) -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ 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