ENH: support bytearray and unicode (#3)#4
Conversation
|
Fails on Python 3, |
|
Whoops. I think that should only be for Python 2 because in Python 3 all On Wednesday, November 16, 2016, Alexander Pushkov notifications@github.com
|
|
The error actually happens in the |
As suggested by Songbee@0bb114b
|
Good call @iamale |
note: this passes w/ _pure.py but not w/ _fast.c
|
|
... TIL "All character string values are UTF-8 encoded." https://wiki.theory.org/BitTorrentSpecification#Metainfo_File_Structure |
| (b'd3:bar4:spam3:fooi42ee', {b'bar': b'spam', b'foo': 42}), | ||
| (b'd1:ai1e1:bi2e1:ci3ee', {b'a': 1, b'b': 2, b'c': 3}), | ||
| (b'd1:a1:be', {b'a': b'b'}), | ||
| (b'3:\x00\x01\x02', bytearray([0, 1, 2])), |
|
Also I think it would be nice to decode unicode strings to |
" All character string values are UTF-8 encoded."