Fix for unicode can't decode ascii...
Last active
August 29, 2015 13:58
-
-
Save ecarreras/10370290 to your computer and use it in GitHub Desktop.
Sitecustomize
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
import sys | |
actual_encoding = sys.getdefaultencoding() | |
try: | |
import locale | |
loc = locale.getdefaultlocale() | |
if loc[1]: | |
encoding = loc[1] | |
sys.setdefaultencoding(encoding) | |
except ImportError: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment