Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> s = u'→é'
- >>> s.encode('utf-8')
- '\xe2\x86\x92\xc3\xa9'
- >>> s.encode('utf-16')
- '\xff\xfe\x92!\xe9\x00'
- >>> s.encode('ascii')
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement