Message65461
| Author | ishimoto |
|---|---|
| Recipients | ishimoto |
| Date | 2008-04-14.09:54:20 |
| SpamBayes Score | 0.00028787833 |
| Marked as misclassified | No |
| Message-id | <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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 |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-04-14 09:54:24 | ishimoto | set | spambayes_score: 0.000287878 -> 0.00028787833 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 | |