Skip to content

fix: 修复中文邮件乱码并准备 v1.1.4 - #19

Merged
Lur1N77777 merged 2 commits into
mainfrom
fix/issue-17-chinese-mail-encoding
Oct 1, 2026
Merged

Lur1N77777 merged 2 commits into
mainfrom
fix/issue-17-chinese-mail-encoding

Conversation

@Lur1N77777

@Lur1N77777 Lur1N77777 commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Android 上 Expo 54 的 TextDecoder 只支持 UTF-8。收到 GBK/GB2312 等编码邮件时,PostalMime 的解码和 Windows-1252 回退均失败,应用随后把原字节按 UTF-8 解码,导致 HTML 和纯文本视图都显示 �。

在解析前检测字符集支持,仅对不完整的运行时安装纯 JavaScript TextDecoder。修复覆盖 GBK、GB2312、GB18030、Big5 的正文、主题、发件人和附件文件名,保留正常浏览器的原生解码器。普通邮箱旧缓存利用保留的 MIME 一次性重新解析,不改变增量同步锚点;没有保留 MIME 的旧管理员摘要缓存由正常首页加载重新获取。

版本升级到 1.1.4,Android versionCode / iOS buildNumber 为 18,同步更新中英文说明、变更日志和版本门禁。

Fixes #17

验证:

  • 使用项目实际的 Expo TextDecoder 复现:修复前 8 个中文编码用例失败,修复后通过。
  • 全套测试:117 通过,1 个已有测试跳过,包含中文附件文件名断言。
  • pnpm check、pnpm lint、pnpm build 通过。
  • 使用仓库 CI 的 GITHUB_ACTIONS=true 配置成功导出 Android Hermes 字节码和 Web 生产包。本地默认配置首次 Web 导出遇到已有的 NativeWind CSS SHA-1 路径问题。
  • 检查了并发解析、解析器异常回退、附件字节保留及旧缓存迁移。

尚未使用报告者的原始邮件在 Android 真机验证。已经在服务端丢失原始字节的内容无法通过客户端解码恢复。

@Lur1N77777
Lur1N77777 marked this pull request as ready for review October 1, 2026 01:26
@Lur1N77777 Lur1N77777 changed the title fix: 修复 Android 中文邮件解码及旧缓存乱码 fix: 修复中文邮件乱码并准备 v1.1.4 Oct 1, 2026
@Lur1N77777
Lur1N77777 merged commit 9746636 into main Oct 1, 2026
2 checks passed
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