Add utf-8 encoding in latex log opening
By default, open use ascii encoding leading to crash when non ascii caracters are present . Fix it by enforcing UTF-8 encoding
This commit is contained in:
@@ -80,7 +80,7 @@ def latex2pdf(latex, pdflatex='pdflatex', passes=3):
|
|||||||
outfile.close()
|
outfile.close()
|
||||||
re_errors = re.compile('^\!(.*)$', re.M)
|
re_errors = re.compile('^\!(.*)$', re.M)
|
||||||
re_warnings = re.compile('^LaTeX Warning\:(.*)$', re.M)
|
re_warnings = re.compile('^LaTeX Warning\:(.*)$', re.M)
|
||||||
flog = open(logname)
|
flog = open(logname,encoding="utf-8")
|
||||||
try:
|
try:
|
||||||
loglines = flog.read()
|
loglines = flog.read()
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Reference in New Issue
Block a user