Skip to content

Commit 92031c0

Browse files
anntzerMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #12890: Restrict postscript title to ascii.
1 parent 747916d commit 92031c0

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
@@ -973,7 +973,7 @@ def _print_figure(
973973
isEPSF = format == 'eps'
974974
if isinstance(outfile, (str, getattr(os, "PathLike", ()),)):
975975
outfile = title = getattr(os, "fspath", lambda obj: obj)(outfile)
976-
title = title.encode("latin-1", "replace").decode("latin-1")
976+
title = title.encode("ascii", "replace").decode("ascii")
977977
passed_in_file_object = False
978978
elif is_writable_file_like(outfile):
979979
title = None

0 commit comments

Comments
 (0)