Skip to content

Commit

Permalink
Update parse.py
Browse files Browse the repository at this point in the history
Fix  GBK encoding error when saving  markdown files on Windows
  • Loading branch information
yhfgyyf authored Jul 1, 2024
1 parent 56bc48d commit f31e4bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gptpdf/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def _process_page(index, image_info):

# 输出结果
output_path = os.path.join(output_dir, 'output.md')
with open(output_path, 'w') as f:
with open(output_path, 'w',encoding='utf-8') as f:
f.write('\n\n'.join(contents))

return '\n\n'.join(contents)
Expand Down

0 comments on commit f31e4bb

Please sign in to comment.