Offset in the header may be wrong if the source contains multibyte
characters. Fix it by encoding the string to utf-8 before calculating
the offset.
For examaple:
>>> s='Exiting¡ ¬'
>>> len(s)
10
>>> len(s.encode('utf-8'))
12
Signed-off-by: Tzung-Bi Shih <penvirus@gmail.com>
b44525f