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-printableorbase64 - Decode the content
- Use
ianaindex.MIMEto look up the encoding - Use the encoding from to convert the bytes to UTF-8