Looking through decode_header in the Git source, it looks like there are several possible encodings. Currently, we only support quoted-printable UTF-8 and ignore anything else (implemented in #25.)
To support arbitrary encodings, I think we need to:
- Identify the encoding from the text between the first
=? and the next ?
- Use the
q? or b? to determine if the content until the next =? is encoded as quoted-printable or base64
- Decode the content
- Use
ianaindex.MIME to look up the encoding
- Use the encoding from to convert the bytes to UTF-8