Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71d0070

Browse files
authored
Merge pull request #12869 from anntzer/ps-encoding
Fix latin-1-ization of Title in eps.
2 parents 5308e6b + 25e413f commit 71d0070

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_ps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ def _print_figure(
972972
isEPSF = format == 'eps'
973973
if isinstance(outfile, (str, getattr(os, "PathLike", ()),)):
974974
outfile = title = getattr(os, "fspath", lambda obj: obj)(outfile)
975-
title = title.encode("latin-1", "replace").decode()
975+
title = title.encode("latin-1", "replace").decode("latin-1")
976976
passed_in_file_object = False
977977
elif is_writable_file_like(outfile):
978978
title = None

0 commit comments

Comments
 (0)