fix mail reading: don't raise invalid byte sequence in UTF-8 when reading non-UTF-8 emails #347

merged 1 commit into from Nov 9, 2012


None yet

8 participants


recreated the pull request I did in #341 to fix #340. This version should also be fine with ruby 1.8.7 - if not, please adjust.


+1 for this.

Other mail clients(not based on ruby mail) like gmail displays such letters without telling that something is wrong. We should do the same.


👍 to merge it.






+1 to merge please =)


Thanks, looks good. Merged.

@mikel mikel merged commit c7818a9 into mikel:master Nov 9, 2012


@jeremy jeremy commented on the diff Jul 23, 2014
@@ -1884,6 +1884,7 @@ def parse_message
def raw_source=(value)
+ value.force_encoding("binary") if RUBY_VERSION >= "1.9.1"
jeremy Jul 23, 2014

This changes the encoding of its argument unexpectedly. Compare with value = value.dup.force_encoding('binary') or value = value.encode('binary')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment