line_profiler icon indicating copy to clipboard operation
line_profiler copied to clipboard

fix encoding error

Open icyblade opened this issue 7 years ago • 2 comments

UnicodeEncodeError will be raised if there are non-ansi characters(e.g. CJK) in the code. This PR will solve this problem by encoding codes with UTF-8.

icyblade avatar May 22 '17 08:05 icyblade

The stream might have a different encoding. If the stream is sys.stdout, then it might have an .encoding attribute that can be inspected to find this out. UTF-8 cannot be assumed.

rkern avatar May 22 '17 17:05 rkern

@rkern Is this PR ready to be merged?

icyblade avatar Sep 07 '17 09:09 icyblade