diff --git a/lib/matplotlib/type1font.py b/lib/matplotlib/type1font.py index 094ff5560121..ff3ae21a594d 100644 --- a/lib/matplotlib/type1font.py +++ b/lib/matplotlib/type1font.py @@ -216,7 +216,7 @@ def _parse(self): # The spec calls this an ASCII format; in Python 2.x we could # just treat the strings and names as opaque bytes but let's # turn them into proper Unicode, and be lenient in case of high bytes. - convert = lambda x: x.decode('ascii', errors='replace') + convert = lambda x: x.decode('ascii') for token, value in filtered: if token is self._name and value.startswith(b'/'): key = convert(value[1:])