From f2306449278940c04768cd4ca0fa9fd7ca29c45b Mon Sep 17 00:00:00 2001 From: metrovoc Date: Wed, 17 Jun 2026 15:20:22 +0900 Subject: [PATCH] fix(deps): enable mail-parser full_encoding for legacy CJK charsets Without the `full_encoding` feature, mail-parser ships only the UTF-8 / ASCII decoders, so a message whose body or encoded-word headers use a legacy charset (ISO-2022-JP, Shift-JIS, EUC-JP, GBK, Big5, windows-*) is passed through undecoded and renders as mojibake in `message read`. These charsets are still widely used by Japanese bank / utility / corporate senders. Enabling `full_encoding` pulls in encoding_rs and restores the decoders, after which affected messages render correctly. Listing (`envelope list`, `gmail messages list`) was unaffected because it uses the header values already decoded by the Gmail API; only the RAW-fetch + mail-parser path in `message read` was broken. Co-authored-by: metrovoc Refs: #706 --- Cargo.lock | 1 + Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 5d0aa1d2..4d457f4a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1402,6 +1402,7 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8a2420e9ce11c2b0583ca97ddff7ab2398c8a613154e9b72e3bafdbf767f1d7" dependencies = [ + "encoding_rs", "hashify", "serde", ] diff --git a/Cargo.toml b/Cargo.toml index 0b733da3..f54ddaf0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ io-maildir = { version = "0.1", default-features = false, optional = true } io-smtp = { version = "0.1", default-features = false, optional = true } log = "0.4" mail-builder = "0.4" -mail-parser = { version = "0.11", features = ["serde"], optional = true } +mail-parser = { version = "0.11", features = ["full_encoding", "serde"], optional = true } mime_guess = { version = "2", optional = true } open = "5" pimalaya-cli = { version = "0.0.1", default-features = false, features = ["terminal", "table", "prompt", "wizard", "imap", "smtp", "jmap", "spinner"] }