From 072489f436be63dce23f029c48b6d23229aeedc6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 6 Aug 2017 13:03:32 +1000 Subject: [PATCH] fix unicode error when generating latex --- anki/latex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/latex.py b/anki/latex.py index 668a184a2..016a0a2c2 100644 --- a/anki/latex.py +++ b/anki/latex.py @@ -110,7 +110,7 @@ package in the LaTeX header instead.""") % bad # write into a temp file log = open(namedtmp("latex_log.txt"), "w") texpath = namedtmp("tmp.tex") - texfile = open(texpath, "w") + texfile = open(texpath, "w", encoding="utf8") texfile.write(latex) texfile.close() mdir = col.media.dir()