Skip to content

Commit 08fbcdc

Browse files
committed
Merge pull request matplotlib#7 from leejjoon/py3-update-texmanager
Py3 update texmanager
2 parents c2576db + 3dbdca0 commit 08fbcdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/texmanager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def make_tex(self, tex, fontsize):
259259
fh.write(s.encode('utf8'))
260260
else:
261261
try:
262-
fh.write(s)
262+
fh.write(s.encode('ascii'))
263263
except UnicodeEncodeError as err:
264264
mpl.verbose.report("You are using unicode and latex, but have "
265265
"not enabled the matplotlib 'text.latex.unicode' "
@@ -322,7 +322,7 @@ def make_tex_preview(self, tex, fontsize):
322322
fh.write(s.encode('utf8'))
323323
else:
324324
try:
325-
fh.write(s)
325+
fh.write(s.encode('ascii'))
326326
except UnicodeEncodeError as err:
327327
mpl.verbose.report("You are using unicode and latex, but have "
328328
"not enabled the matplotlib 'text.latex.unicode' "

0 commit comments

Comments
 (0)