fix #21, UnicodeEncodeError when non ascii characters in headers