add encode('utf-8') accidently removed in 212f19b

this restores compatibility with python3.
fixes afflux/pure-python-otr#50