[PR #378] [MERGED] Fix the issue of decoding a non-UTF-8 encoded file using UTF-8 encodi… #22474

Closed
opened 2026-02-21 20:19:03 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify/pull/378
Author: @AtmosphereMao
Created: 6/15/2023
Status: Merged
Merged: 6/16/2023
Merged by: @JohnJyong

Base: mainHead: patch-2


📝 Commits (1)

  • af838a3 Fix the issue of decoding a non-UTF-8 encoded file using UTF-8 encoding resulting in an error

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 api/controllers/console/datasets/file.py (+3 -1)

📄 Description

image
读取非UTF-8文件时会发生致命报错,采用chardet检测编码格式自适应解码


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify/pull/378 **Author:** [@AtmosphereMao](https://github.com/AtmosphereMao) **Created:** 6/15/2023 **Status:** ✅ Merged **Merged:** 6/16/2023 **Merged by:** [@JohnJyong](https://github.com/JohnJyong) **Base:** `main` ← **Head:** `patch-2` --- ### 📝 Commits (1) - [`af838a3`](https://github.com/langgenius/dify/commit/af838a3a6076dedd85d92374b09bee66b09ec5b1) Fix the issue of decoding a non-UTF-8 encoded file using UTF-8 encoding resulting in an error ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `api/controllers/console/datasets/file.py` (+3 -1) </details> ### 📄 Description ![image](https://github.com/langgenius/dify/assets/36625222/39c5ae7f-ba52-4519-b1c7-3c0827ea48f7) 读取非UTF-8文件时会发生致命报错,采用chardet检测编码格式自适应解码 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-21 20:19:03 -05:00
yindo closed this issue 2026-02-21 20:19:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22474