mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Rename utf8b error handler to surrogateescape.
This commit is contained in:
parent
e0a2b72e61
commit
43c57785d3
9 changed files with 30 additions and 30 deletions
|
@ -708,13 +708,13 @@ if sys.platform != 'win32':
|
|||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue