We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaecec4 commit 4f62f84Copy full SHA for 4f62f84
lib/matplotlib/dviread.py
@@ -1030,6 +1030,14 @@ def find_tex_file(filename, format=None):
1030
The library that :program:`kpsewhich` is part of.
1031
"""
1032
1033
+ if six.PY3:
1034
+ # we expect these to always be ascii encoded, but use utf-8
1035
+ # out of caution
1036
+ if isinstance(filename, bytes):
1037
+ filename = filename.decode('utf-8', errors='replace')
1038
+ if isinstance(format, bytes):
1039
+ format = format.decode('utf-8', errors='replace')
1040
+
1041
cmd = [str('kpsewhich')]
1042
if format is not None:
1043
cmd += ['--format=' + format]
0 commit comments