Message83843
| Author |
vstinner |
| Recipients |
brett.cannon, christian.heimes, shidot, vstinner |
| Date |
2009年03月20日.01:30:33 |
| SpamBayes Score |
1.463159e-09 |
| Marked as misclassified |
No |
| Message-id |
<1237512637.14.0.761079152996.issue4282@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Oops, i misread this issue (wrong title!). #4626 is related, but this
issue is about the profile module. The problem is that profile open
the source code as text (with the default charset: UTF-8).
Attached patch fixes the problem.
Example:
--- x.py (ISO-8859-1 text file) ---
#coding: ISO-8859-1
print("hé hé")
-----------------------------------
Run: python -m profile x.py
Current result:
(...)
File ".../py3k/Lib/profile.py", line 614, in main
script = fp.read()
File ".../Lib/codecs.py", line 300, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode bytes (...)
With my patch, it works as expected. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年03月20日 01:30:38 | vstinner | set | recipients:
+ vstinner, brett.cannon, christian.heimes, shidot |
| 2009年03月20日 01:30:37 | vstinner | set | messageid: <1237512637.14.0.761079152996.issue4282@psf.upfronthosting.co.za> |
| 2009年03月20日 01:30:35 | vstinner | link | issue4282 messages |
| 2009年03月20日 01:30:33 | vstinner | create |
|