Backport of r64677.
diff --git a/Lib/test/test_cookielib.py b/Lib/test/test_cookielib.py
index 991506c..66f9a83 100644
--- a/Lib/test/test_cookielib.py
+++ b/Lib/test/test_cookielib.py
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- coding: latin-1 -*-
"""Tests for cookielib.py."""
import re, os, time
diff --git a/Misc/NEWS b/Misc/NEWS
index ebaefd4..c8fbedf 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -117,6 +117,8 @@
Tests
-----
+- Issue #3261: test_cookielib had an improper file encoding specified.
+
- Patch #2232: os.tmpfile might fail on Windows if the user has no
permission to create files in the root directory.