[GH-ISSUE #3562] [BUG]: When uploading files containing Chinese characters in filenames via the API, the filenames appear as garbled text/mojibake after successful transfer. #2298

Closed
opened 2026-02-22 18:29:03 -05:00 by yindo · 1 comment
Owner

Originally created by @zhoufoxcn on GitHub (Mar 29, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3562

How are you running AnythingLLM?

Docker (remote machine)

What happened?

During the deployment of Ollama and the Docker image for Anything LLM on a remote workstation, testing revealed that the system can properly display and process Chinese characters contained within uploaded file contents. However, when uploading files with Chinese filenames (e.g., "基于深度学习的配电网线路设备缺陷智能检测.docx"), a discrepancy was observed:

​Browser UI upload via Anything LLM's interface ​preserves Chinese filenames without corruption.
​API upload (using the /api/v1/document/upload endpoint) through programmatic methods or tools like Postman results in ​garbled filenames (e.g., mojibake), though the file contents remain unaffected.

Technical Translation Notes:

"garbled filenames/mojibake" (encoding-specific corruption)
Clarified distinction between UI and API behavior
Maintained original Chinese filename as context-preserving example
Explicitly noted unaffected file contents to isolate the filename encoding issue

Are there known steps to reproduce?

No response

Originally created by @zhoufoxcn on GitHub (Mar 29, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3562 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? During the deployment of Ollama and the Docker image for Anything LLM on a remote workstation, testing revealed that the system can properly display and process Chinese characters contained within uploaded file contents. However, when uploading files with Chinese filenames (e.g., "基于深度学习的配电网线路设备缺陷智能检测.docx"), a discrepancy was observed: ​Browser UI upload via Anything LLM's interface ​preserves Chinese filenames without corruption. ​API upload (using the /api/v1/document/upload endpoint) through programmatic methods or tools like Postman results in ​garbled filenames (e.g., mojibake), though the file contents remain unaffected. Technical Translation Notes: "garbled filenames/mojibake" (encoding-specific corruption) Clarified distinction between UI and API behavior Maintained original Chinese filename as context-preserving example Explicitly noted unaffected file contents to isolate the filename encoding issue ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:29:03 -05:00
yindo closed this issue 2026-02-22 18:29:03 -05:00
Author
Owner

@timothycarambat commented on GitHub (Mar 31, 2025):

Specify charset when sending the request via POST, that is what is occurring. The UI inherits one from the native system, but not the API https://github.com/Mintplex-Labs/anything-llm/issues?q=is%3Aissue%20state%3Aclosed%20garbled

@timothycarambat commented on GitHub (Mar 31, 2025): Specify `charset` when sending the request via POST, that is what is occurring. The UI inherits one from the native system, but not the API https://github.com/Mintplex-Labs/anything-llm/issues?q=is%3Aissue%20state%3Aclosed%20garbled
yindo changed title from [BUG]: When uploading files containing Chinese characters in filenames via the API, the filenames appear as garbled text/mojibake after successful transfer. to [GH-ISSUE #3562] [BUG]: When uploading files containing Chinese characters in filenames via the API, the filenames appear as garbled text/mojibake after successful transfer. 2026-06-05 14:45:44 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2298