2008/4/13, Greg Ewing <[EMAIL PROTECTED]>: > I'm not sure what to do about that, though. Maybe some > sort of locale setting that makes repr() of a string not > escape chars that fall into some kind of "normal" set > according to the user's native language? >
Here's my idea. repr() cannot convert 'unprintable characters', since repr() doesn't know which characters are printable or not. So, repr() should convert only non-printable "ASCII" characters and special "ASCII" characters such as '\n". Other non-ASCII characters are converted by output file. Output files can convert non-printable characters to \uXXXX. Such conversions could be implemented by backslashreplace error handler. I wrote a quick patch. Please take a look at http://bugs.python.org/issue2630 . _______________________________________________ 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