Skip to content

Commit d0e727b

Browse files
authored
Merge pull request #12894 from meeseeksmachine/auto-backport-of-pr-12890-on-v3.0.x
Backport PR #12890 on branch v3.0.x (Restrict postscript title to ascii.)
2 parents 7f57d65 + 92031c0 commit d0e727b

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)