Guest User

Untitled

a guest
May 31st, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. # Python 2:
  2. os.walk(u'.')
  3.  
  4. # Python 3:
  5. os.walk('.')
  6.  
  7. >>> u'я'.encode('cp866')
  8. b'xef'
  9. >>> u'я'.encode('cp1251')
  10. b'xff'
  11. >>> u'я'.encode('utf-8')
  12. b'xd1x8f'
  13.  
  14. >>> b'xef'.decode('cp866')
  15. u'я'
  16. >>> b'xef'.decode('latin-1')
  17. u'ï'
Add Comment
Please, Sign In to add comment