Skip to content

[Bug]: Feishu plugin: Chinese filenames in attachments display as garbled (Latin-1 encoding issue) #59409

@cycle0

Description

@cycle0

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When receiving files with Chinese filenames via Feishu webhook, the filenames are displayed as garbled text (e.g., "六大组件全解析.md" shows as "å_å_ç_ä_å_è_æ.md"). Server locale is correctly set to UTF-8, but the filename appears to be decoded using Latin-1 during inbound message processing.

Steps to reproduce

  1. Send a file with Chinese filename (e.g., "六大组件全解析.md") via Feishu chat to the OpenClaw bot
  2. Check the saved file in /root/.openclaw/media/inbound/ directory
  3. Observe the filename is garbled (Latin-1 decoded)

Expected behavior

Chinese filenames should be preserved correctly in UTF-8 encoding. The file should be saved as "harness-六大组件全解析.md" or similar readable Chinese name.

Actual behavior

The filename is garbled due to Latin-1/ISO-8859-1 decoding of UTF-8 bytes. Example: "harness-å_å_ç_ä_å_è_æ---b06a5805-c48b-49f4-9807-37478b7b24bc.md" instead of "harness-六大组件全解析.md"

OpenClaw version

2026.4.1

Operating system

Linux 6.8.0-49-generic (x64)

Install method

npm (global install)

Model

N/A - Bug occurs before model inference (in webhook parsing)

Provider / routing chain

feishu (inbound webhook handler)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Impact: Affected: All Feishu users who receive files with non-ASCII filenames
Severity: Medium - data is accessible but filenames are unreadable

Additional information

The outbound filename handling (sanitizeFileNameForUpload) was fixed in v2026.3.2 according to code comments in media.d.ts, but the inbound path (webhook message attachment parsing) still has this encoding issue. This suggests the fix was only applied to the upload path, not the download/receive path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crashclawsweeperTracked by ClawSweeper automation

    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