jesselau76 / ebook-GPT-translator

Enjoy reading with your favorite style.
https://jesselau.com
MIT License
1.64k stars 211 forks source link

这样的报错是编码什么问题么?看程序里也没有gbk的编码呀 #16

Open dajieli opened 1 year ago

dajieli commented 1 year ago

image 这样的报错是编码那块不对么?

chanda commented 1 year ago

我也遇到了相似的报错:

Traceback (most recent call last): File "text_translation.py", line 451, in print(return_text(short_text)) UnicodeEncodeError: 'latin-1' codec can't encode character '\u201a' in position 379: ordinal not in range(256)

jesselau76 commented 1 year ago

pip install chardet 应可解决

BUENDIA1994 commented 1 year ago

同样的问题 image 换了一个英文的文本,换了一个编码还是报错 image en.pdf