$ python -c "print u'Hey there\u2013t'" Hey there–t $ python -c "print u'Hey there\u2013t'" > `tempfile` Traceback (most recent call last): File "The solution is:", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 9: ordinal not in range(128)
PYTHONIOENCODING="utf_8" python -c "print u'Hey there\u2013t'" > `tempfile`
No comments:
Post a Comment