penvirus and portante Fix wrong offset for multibyte characters
b44525f Apr 28, 2022
Fix wrong offset for multibyte characters
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