10000 update make_tex and make_tex_preview in texmanager.py to work on Py3k · takluyver/matplotlib@3dbdca0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3dbdca0

Browse files
committed
update make_tex and make_tex_preview in texmanager.py to work on Py3k
1 parent c2576db commit 3dbdca0

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)
0