Last active
May 26, 2017 02:00
-
-
Save hgirish/802c809c7b9bb4279f6fdd9d7f34cbe3 to your computer and use it in GitHub Desktop.
Windows UnicodeEncodeError: 'charmap' codec can't encode character
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# taken from https://forum.sublimetext.com/t/windows-st3-python-3-unicode-output/15261/4 | |
import sys | |
from io import TextIOWrapper | |
sys.stdout = TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment