When the knowledge base parses the pdf file in sections, it will be garbled. #6956

Closed
opened 2026-02-21 18:18:07 -05:00 by yindo · 2 comments
Owner

Originally created by @zlm0001 on GitHub (Nov 26, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.12.1

Cloud or Self Hosted

Cloud

Steps to reproduce

GB 15322.2-2019.pdf

After uploading the【GB15322.2-2019.pdf】file in the knowledge base of the trial environment of dify's official website, select 【Automatic Segmentation and Cleaning】, and the segmentation will be garbled code

image
image

image

✔️ Expected Behavior

The document can be parsed into Chinese normally

image

Actual Behavior

The parsed content is all garbled
image

Originally created by @zlm0001 on GitHub (Nov 26, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.12.1 ### Cloud or Self Hosted Cloud ### Steps to reproduce [GB 15322.2-2019.pdf](https://github.com/user-attachments/files/17917003/GB.15322.2-2019.pdf) After uploading the【GB15322.2-2019.pdf】file in the knowledge base of the trial environment of dify's official website, select 【Automatic Segmentation and Cleaning】, and the segmentation will be garbled code ![image](https://github.com/user-attachments/assets/10debddc-defd-49bb-815a-ada5020af6a6) ![image](https://github.com/user-attachments/assets/4eeb9442-a16e-4de5-b566-ca7693e8d15b) ![image](https://github.com/user-attachments/assets/87a46366-e4bd-4dcf-87c2-c795ada5a779) ### ✔️ Expected Behavior The document can be parsed into Chinese normally ![image](https://github.com/user-attachments/assets/987ba594-26f2-4919-822c-8e8bb396893d) ### ❌ Actual Behavior The parsed content is all garbled ![image](https://github.com/user-attachments/assets/87a46366-e4bd-4dcf-87c2-c795ada5a779)
yindo added the 🐞 bugcloud labels 2026-02-21 18:18:07 -05:00
yindo closed this issue 2026-02-21 18:18:07 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 26, 2024):

Hello, @zlm0001! I'm here to help you with any bugs, questions, or contributions you have for dify. Let me know how I can assist you!

I found a similar closed issue regarding PDF files resulting in garbled text due to font or layout issues. The suggested solution was to use another tool to export the PDF as a plain text (txt) or markdown (md) file before importing it into Dify. Additionally, there was a mention that integrating OCR in the future might help improve this issue [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 26, 2024): <!-- Greeting --> Hello, @zlm0001! I'm here to help you with any bugs, questions, or contributions you have for dify. Let me know how I can assist you! <!-- Answer --> I found a similar closed issue regarding PDF files resulting in garbled text due to font or layout issues. The suggested solution was to use another tool to export the PDF as a plain text (txt) or markdown (md) file before importing it into Dify. Additionally, there was a mention that integrating OCR in the future might help improve this issue <sup>[[1]](https://github.com/langgenius/dify/issues/4)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Nov 26, 2024):

See this comment https://github.com/langgenius/dify/issues/10523#issuecomment-2469377015

I have tried to download the file and tried to copy into browser
It will get something like #$ !

@crazywoola commented on GitHub (Nov 26, 2024): See this comment https://github.com/langgenius/dify/issues/10523#issuecomment-2469377015 I have tried to download the file and tried to copy into browser It will get something like `#$ !`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6956