allow setting a custom converter

I'm mostly working on inbound mail and I need to do a lot of guessing / non-perfect conversions that are a little to buggy for to integrate here, having this api would allow me to throw away a bunch of monkeypatches.

@bf4 @jeremy @mikel 


where do you want docs, above the setter methods or in the readme ?


On Tue, Aug 26, 2014 at 8:59 PM, Benjamin Fleischer <
notifications@github.com> wrote:

> In lib/mail/version_specific/ruby_1_9.rb:
>
> > +            Encoding::Shift_JIS
> > +
> > +            # GB2312 (Chinese charset) is a subset of GB18030 (its replacement)
> > +          when /gb2312/i
> > +            Encoding::GB18030
> > +
> > +          else
> > +            charset
> > +          end
> > +        end
> > +      end
> > +    end
> > +
> > +    def self.converter; @@converter; end
> > +    def self.converter=(converter); @@converter = converter; end
> > +    self.converter = SimpleConverter
>
> @jeremy <https://github.com/jeremy> @mikel <https://github.com/mikel>
> thoughts on this implementation? Naming? I'm not sure what the class
> variables buy us (as opposed to class instance variables... is this
> subclassed anywhere?)
>
> An API like this should be documented (besides the test).
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mikel/mail/pull/785/files#r16756453>.
>