Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. > xx = "\xE2\x82\xAC"
  2. "\xE2\x82\xAC"
  3. > xx.bytes
  4. [92, 120, 69, 50, 92, 120, 56, 50, 92, 120, 65, 67]
  5.  
  6. xx.force_encoding('utf-8')
  7. xx.encode('utf-8')
  8. xx.force_encoding('binary').force_encoding('utf-8')
  9. xx.encode('ASCII-8BIT').encode('utf-8')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement