With 'utf8' and 'ucs2', Buffer.write() sets Buffer._charsWritten property.
But with 'ascii', 'base64', 'binary' and 'hex' (only v0.5), write() doesn't set the property.
This patch for v0.4 branch.
I will fix for 'hex' encoding after v0.4 branch is merged to the master.
buffer: write() should always set _charsWritten.
@koichik: LGTM too, anything holding you back from merging this into master?
@bnoordhuis - I am waiting to be merged by @ry (or release manager?).
@koichik - v0.4 has been merged in 52044fd
@ry - Thanks! I'm fixing 'hex' encoding.