rianjs / ical.net

ical.NET - an open source iCal library for .NET
MIT License
782 stars 230 forks source link

Quoted Printable field support #523

Open JamesMenzies opened 3 years ago

JamesMenzies commented 3 years ago

Adding support for Quoted Printable fields

Related to Issue #448

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.