go-gitdiff
go-gitdiff copied to clipboard
Implement full decoding support for patch subjects
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?
orb?
to determine if the content until the next=?
is encoded asquoted-printable
orbase64
- Decode the content
- Use
ianaindex.MIME
to look up the encoding - Use the encoding from to convert the bytes to UTF-8