Skip to content

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

@alex-xuweilong

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

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions