Issue #1729305: Fix doctest to handle encode error with "backslashreplace".  It fixes #7667 too.
diff --git a/Misc/NEWS b/Misc/NEWS
index c55888b..f206f03 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -35,6 +35,8 @@
 Library
 -------
 
+- Issue #1729305: Fix doctest to handle encode error with "backsplashreplace".
+
 - Issue #691291: codecs.open() should not convert end of lines on reading and
   writing.