Skip to content

feat: centralized filename encoding utility for multi-encoding Content-Disposition handling #48788

Description

@alex-xuweilong

Context

PR #48578 fixes the most common case (UTF-8 misread as Latin-1) for Feishu Chinese filenames. However, as noted by @Artyomkun, a proper architectural solution should handle multiple encodings (Shift-JIS, EUC-KR, GB18030, etc.) across all channel adapters.

Proposal

Create a central filename utility that:

  • Parses Content-Disposition headers with RFC 5987 support
  • Detects and recovers common encoding mismatches
  • Can be reused by all channel adapters (Feishu, Telegram, Discord, etc.)

Follow-up from #48388 / #48578.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions