Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4ad5179

Browse filesBrowse files
authored
Merge pull request #9533 from matplotlib/auto-backport-of-pr-9292
Backport PR #9292 on branch v2.1.x
2 parents f39813c + 4f62f84 commit 4ad5179
Copy full SHA for 4ad5179

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎lib/matplotlib/dviread.py

Copy file name to clipboardExpand all lines: lib/matplotlib/dviread.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,14 @@ def find_tex_file(filename, format=None):
10301030
The library that :program:`kpsewhich` is part of.
10311031
"""
10321032

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+
10331041
cmd = [str('kpsewhich')]
10341042
if format is not None:
10351043
cmd += ['--format=' + format]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.