Skip to content

Instantly share code, notes, and snippets.

@jaraco
Created January 24, 2017 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaraco/12abfc05872c65a4f3f6cd58b6f9be4d to your computer and use it in GitHub Desktop.
Save jaraco/12abfc05872c65a4f3f6cd58b6f9be4d to your computer and use it in GitHub Desktop.
jaraco@host:~$ cat > test.py
uni = u"\u001A\u0BC3\u1451\U0001D10C"
print uni
jaraco@host:~$ python2.7 ./test.py > out.txt
Traceback (most recent call last):
File "./test.py", line 2, in <module>
print uni
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-3: ordinal not in range(128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment