From c484029333aac96db107c0406968d41d3f137585 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Apr 2024 10:08:29 -0400 Subject: [PATCH] Use 'utf-8' for consistency with other modules. --- src/towncrier/_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/towncrier/_writer.py b/src/towncrier/_writer.py index 4145e3d4..72b53289 100644 --- a/src/towncrier/_writer.py +++ b/src/towncrier/_writer.py @@ -40,7 +40,7 @@ def append_to_newsfile( # Leave newlines alone. This probably leads to inconsistent newlines, # because we've loaded existing content with universal newlines, but that's # the original behavior. - with news_file.open("w", encoding="utf8", newline="") as f: + with news_file.open("w", encoding="utf-8", newline="") as f: if header: f.write(header) # If there is no previous body that means we're writing a brand new news file.