Author vstinner
Recipients brett.cannon, christian.heimes, shidot, vstinner
Date 2009-03-20.01:30:33
SpamBayes Score 1.46316e-09
Marked as misclassified No
Message-id <>
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.

--- (ISO-8859-1 text file) ---
#coding: ISO-8859-1
print("hé hé")

Run: python -m profile

Current result:
  File ".../py3k/Lib/", line 614, in main
    script =
  File ".../Lib/", 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.
Date User Action Args
2009-03-20 01:30:38vstinnersetrecipients: + vstinner, brett.cannon, christian.heimes, shidot
2009-03-20 01:30:37vstinnersetmessageid: <>
2009-03-20 01:30:35vstinnerlinkissue4282 messages
2009-03-20 01:30:33vstinnercreate