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

Quoted Printable field support #523

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JamesMenzies
Copy link

Adding support for Quoted Printable fields

Related to Issue #448

  • GetContentLines string parsers to support line continuation when Encoding is quoted printable AND line ends with =
  • handle fields with encoding quoted printable string fields.
  • support utf8, utf16, and SJIS encoding in quoted printable encoding.

I am far from convinced that this is a good solution. There are a number of places where this pull seems inelegant.

  1. The implementation I have made in of GetContentLines that tests for the encoding by a string match is ugly. I would prefer to, get the field name, read the properties, and then use that information while parsing the value but that is structural change.
  2. I think I've made an untidy thing in the DataTypes/QuotedPrintableString.cs I think I should be wrapping the value in a strongly typed object. The way I am using it as something like a Type flag feels more like a hack.
  3. encoding name matching added to GetEncoderFor isn't pretty.
  4. The trick to support SJIS encoding is secret magic. I think you just have to live with in .netstandard it but in is a bear trap that will eat someone.

* string parsers to support line continuation when Encoding is quoted printable AND line ends with =
* handle fields with encoding quoted printable string fields.
* support utf8, utf16, and SJIS quoted printable encoding.
@JamesMenzies JamesMenzies marked this pull request as ready for review June 14, 2021 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant