Skip to content

Commit ff5ff6a

Browse files
committed
Work around "Encoding::CompatibilityError: incompatible character encodings: UTF-8 and BINARY (ASCII-8BIT)"
on ruby-list: 37565, 38116, 43106
1 parent 6ecace8 commit ff5ff6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/models/message.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def from_mail(mail, list, list_seq)
1616
if ((list.name == 'ruby-dev') && list_seq.in?([13859, 26229, 39731, 39734])) || ((list.name == 'ruby-core') && list_seq.in?([5231])) || ((list.name == 'ruby-list') && list_seq.in?([29637, 29711, 30148])) || ((list.name == 'ruby-talk') && list_seq.in?([5198, 61316]))
1717
body.gsub!("\u0000", '')
1818
end
19+
if (list.name == 'ruby-list') && list_seq.in?([37565, 38116, 43106])
20+
mail.header[:subject].value.chop!
21+
end
1922
subject = mail.subject
2023
subject = Kconv.toutf8 subject if subject
2124
from = Kconv.toutf8 mail.from_address&.raw

0 commit comments

Comments
 (0)