Skip to content

Comments

Decode by Mail gem's decoded before Kconving#95

Merged
amatsuda merged 1 commit intoruby:mainfrom
amatsuda:mojibake
Jan 4, 2026
Merged

Decode by Mail gem's decoded before Kconving#95
amatsuda merged 1 commit intoruby:mainfrom
amatsuda:mojibake

Conversation

@amatsuda
Copy link
Member

@amatsuda amatsuda commented Jan 4, 2026

body is now decoded by the hybrid approach as follows: body.decoded: handles Content-Transfer-Encoding (base64, quoted-printable) Kconv.toutf8: auto-detects charset (handles mislabeled charsets in legacy emails).

This patch is a fix for mojibake in newly imported messages, and the mojibake in some existing messages in production DB are already updated by another batch that implements similar logic.

body is now decoded by the hybrid approach as follows:
body.decoded: handles Content-Transfer-Encoding (base64, quoted-printable)
Kconv.toutf8: auto-detects charset (handles mislabeled charsets in legacy emails)
@amatsuda amatsuda merged commit 0554f55 into ruby:main Jan 4, 2026
0 of 2 checks passed
@amatsuda amatsuda deleted the mojibake branch January 4, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant