Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement full decoding support for patch subjects #26

Open
bluekeyes opened this issue Jul 19, 2021 · 0 comments
Open

Implement full decoding support for patch subjects #26

bluekeyes opened this issue Jul 19, 2021 · 0 comments
Labels
enhancement New feature or request parsing Issues related to parsing patches

Comments

@bluekeyes
Copy link
Owner

bluekeyes commented Jul 19, 2021

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:

  1. Identify the encoding from the text between the first =? and the next ?
  2. Use the q? or b? to determine if the content until the next =? is encoded as quoted-printable or base64
  3. Decode the content
  4. Use ianaindex.MIME to look up the encoding
  5. Use the encoding from to convert the bytes to UTF-8
@bluekeyes bluekeyes added enhancement New feature or request parsing Issues related to parsing patches labels Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request parsing Issues related to parsing patches
Projects
None yet
Development

No branches or pull requests

1 participant