diff --git a/lib/matplotlib/dviread.py b/lib/matplotlib/dviread.py index f738fb591d3e..f8c353e179a8 100644 --- a/lib/matplotlib/dviread.py +++ b/lib/matplotlib/dviread.py @@ -1021,7 +1021,14 @@ def find_tex_file(filename, format=None): pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE) result = pipe.communicate()[0].rstrip() _log.debug('find_tex_file result: %s', result) - return result.decode('ascii') + + # workaround for when a tex file has a country + # specfic character in its path name + try: + res = result.decode('ascii') + except UnicodeDecodeError: + res = result.decode('utf-8') + return res @lru_cache()