-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
`gsub!': invalid byte sequence in UTF-8 (ArgumentError) #224
Comments
thanks for the detailed bug report. I'll try to fix this issue within a few days thanks :-) |
Fixed code returns the following result: % ruby -Ilib -rsisimai -e 'puts Sisimai.dump($*.shift)' ./issue-224.eml | jq
[
{
"catch": "",
"token": "d4a360a80e6125e2ca458d36514b54ba2ff5a156",
"lhost": "",
"rhost": "10.9.37.234",
"alias": "",
"listid": "",
"reason": "filtered",
"action": "failed",
"origin": "./issue-224.eml",
"subject": "",
"messageid": "",
"replycode": "",
"smtpagent": "RFC3464",
"softbounce": 1,
"smtpcommand": "",
"destination": "some-domain.net",
"senderdomain": "gelaneeiuet.org",
"feedbacktype": "",
"diagnosticcode": "The email account that you tried to reach does not exist.",
"diagnostictype": "",
"deliverystatus": "5.0.0",
"timezoneoffset": "+0200",
"addresser": "message@gelaneeiuet.org",
"recipient": "jane.doe@some-domain.net",
"timestamp": 1632166379
}
] This bug may have been fixed, perhaps. |
Thanks a lot @azumakuniyuki, your fix is working for me as well. Great work! :-) Kind regards from Bavaria, |
@chahn Thanks for the quick response. Would you mind if we add the email you post at this issue to Best regards, :-) |
@azumakuniyuki Yes of course you can use this email. Headers and content are anonymized therefore. |
@chahn Thank you so much. I'll add the file and commit it soon. Thanks again :-) |
While parsing some emails following error occurs with Sisimai 4.25.11 and 5-beta2 on ruby 3.0.2p107:
This issue seems very related to #137 but here the cause seems to be in a Base64 encoded part of the email body.
The part's content type is
text/plain; charset=ISO-8859-1
(not UTF-8 as expected bygsub!
?). The encoded content has a special character.You can reproduce the error with following email:
Thanks a lot and kind regard from Bavaria,
The text was updated successfully, but these errors were encountered: