use bytearray without struct
utf7.pack always returns a written length
pass socket writing test in Python 3