hmm I think it's sane for this library to deal with encoding as it's the one that knows when it needs to convert to bytes to write out on the wire. If you give this binary data you should be ok (especially in newer versions of python). Requiring `str` as the parameter is odd because if you get anonymous strings (with no encoding information) I think we could still have problems in this function.

I'm in favor of this as is, but i'll defer to you @mreiferson