Rename utf8b error handler to surrogateescape.
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 014d874..c680d8d 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -708,13 +708,13 @@
             self.fsencoding = sys.getfilesystemencoding()
             sys.setfilesystemencoding("utf-8")
             self.dir = support.TESTFN
-            self.bdir = self.dir.encode("utf-8", "utf8b")
+            self.bdir = self.dir.encode("utf-8", "surrogateescape")
             os.mkdir(self.dir)
             self.unicodefn = []
             for fn in self.filenames:
                 f = open(os.path.join(self.bdir, fn), "w")
                 f.close()
-                self.unicodefn.append(fn.decode("utf-8", "utf8b"))
+                self.unicodefn.append(fn.decode("utf-8", "surrogateescape"))
 
         def tearDown(self):
             shutil.rmtree(self.dir)