镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 22:46:48 +00:00
Latex解除非UTF8编码错误
这个提交包含在:
@@ -147,7 +147,7 @@ def 寻找Latex主文件(file_manifest, mode):
|
|||||||
for texf in file_manifest:
|
for texf in file_manifest:
|
||||||
if os.path.basename(texf).startswith('merge'):
|
if os.path.basename(texf).startswith('merge'):
|
||||||
continue
|
continue
|
||||||
with open(texf, 'r', encoding='utf8') as f:
|
with open(texf, 'r', encoding='utf8', errors='ignore') as f:
|
||||||
file_content = f.read()
|
file_content = f.read()
|
||||||
if r'\documentclass' in file_content:
|
if r'\documentclass' in file_content:
|
||||||
canidates.append(texf)
|
canidates.append(texf)
|
||||||
@@ -165,7 +165,7 @@ def 寻找Latex主文件(file_manifest, mode):
|
|||||||
expected_words = ['\input', '\ref', '\cite']
|
expected_words = ['\input', '\ref', '\cite']
|
||||||
for texf in canidates:
|
for texf in canidates:
|
||||||
canidates_score.append(0)
|
canidates_score.append(0)
|
||||||
with open(texf, 'r', encoding='utf8') as f:
|
with open(texf, 'r', encoding='utf8', errors='ignore') as f:
|
||||||
file_content = f.read()
|
file_content = f.read()
|
||||||
for uw in unexpected_words:
|
for uw in unexpected_words:
|
||||||
if uw in file_content:
|
if uw in file_content:
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户