Skip to content

Conversation

@jhermsmeier
Copy link
Contributor

Changed the boolean toString parameter on #decode() to the encoding parameter, which
lets you specify the encoding the bytestring buffer will be converted into.

So instead of

var object = bencode.decode( data, true )

you can choose the encoding with

var object = bencode.decode( data, 'utf8' )  // OR
var object = bencode.decode( data, 'ascii' ) // etc...

Changed the boolean `toString` parameter on
`#decode()` to the `encoding` parameter, which
lets you specify the encoding the bytestring buffer
will be converted into.
Missed to change the type declaration of
the `encoding` parameter on `#decode()`.
themasch added a commit that referenced this pull request Jul 23, 2012
Add `encoding` parameter to `#decode()`
@themasch themasch merged commit 705474a into webtorrent:master Jul 23, 2012
@themasch
Copy link
Contributor

hab dich mal als Collaborator hinzugefügt. Dann kannste direkt pushen. Gute Arbeit!

@jhermsmeier
Copy link
Contributor Author

Hui, danke!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants