Message65461
In py3k, repr() escapes non-ASCII characters in Unicode to \uXXXX as
Python 2. This is unpleasant feature if you are working with non-latin
characters. This issue was once discussed by Hye-Shik Chang[1], but was
rejected. Here's a new challenge for Python 3 to fix issue.
In this patch, repr() converts special ascii characters such as "\t",
"\r", "\n", but doesn't convert non-ASCII characters to \uXXXX form.
Non-ASCII characters are converted by TextIOWrapper on printing. I set
'errors' attribute of sys.stdout and sys.stderr to 'backslashreplace', so
un-printable characters are converted to '\uXXXX' if your console
cannot print such characters.
This patch breaks five regr tests on my environment.
I'll fix these tests if this patch is acceptable.
[1] http://mail.python.org/pipermail/python-dev/2002-October/029443.html
http://bugs.python.org/issue479898 |
|
| Date |
User |
Action |
Args |
| 2008-04-14 09:54:24 | ishimoto | set | spambayes_score: 0.000287878 -> 0.000287878 recipients:
+ ishimoto |
| 2008-04-14 09:54:24 | ishimoto | set | spambayes_score: 0.000287878 -> 0.000287878 messageid: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> |
| 2008-04-14 09:54:22 | ishimoto | link | issue2630 messages |
| 2008-04-14 09:54:22 | ishimoto | create | |
|