Attempting to parse an email with the following header:
Will cause an error: Encoding::ConverterNotFoundError: code converter not found (UTF-7 to UTF-8).
Encoding::ConverterNotFoundError: code converter not found (UTF-7 to UTF-8)
This can be fixed by checking for UTF-7 within the b_value_decode method and using Net::IMAP to decode the string first.
Decode UTF-7 with Net::IMAP before UTF-8 conversion
This prevents an Encoding::ConverterNotFoundError when trying to parse an
unstructured field with a UTF-7 encoded-word.
I'm not sure when it was fixed, but this appears to work on v2.6.3. It still gives a warning, but otherwise seems like this PR could be closed?
# Encoding conversion failed code converter not found (UTF-7 to UTF-8)
deal with complex encoding patters during collapsing
use charset_encoder for param_decode
Merge branch 'master' of https://github.com/mikel/mail
Make the ragel grammar for phrase lists (keywords) more lenient
Support UTF-7 in unstructerd fields #248761
Losely adapted from mikel#650
Decode UTF-7 field values.
Implementation from Ruby stdlib Net::IMAP.