Open icyblade opened 7 years ago
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 Is this PR ready to be merged?
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.