New submission from STINNER Victor:

Attached patch changes how support.TESTFN_UNDECODABLE is computed on UNIX: use 
the filesystem encoding in *strict* mode, not using the surrogateescape error 

So we can use support.TESTFN_UNDECODABLE to check if a function uses correctly 
the surrogateescape error handler and/or check if it behaves correctly with 
non-ASCII characters.

The patch uses also support.TESTFN_UNDECODABLE (only on UNIX) in 
test_cmd_line_script.test_non_ascii() to also check that the fix for #16218 
works with UTF-8 locale encoding.

Please test the patch on UNIX, Windows and Mac OS X.

We may also use support.TESTFN_UNDECODABLE in 
test_cmd_line_script.test_non_ascii() on Windows, I will check.

Windows has some strange behaviour with undecodable characters: some of them 
are replaced a character with a similar glyph.

components: Tests, Unicode
files: support_undecodable.patch
keywords: patch
messages: 175200
nosy: ezio.melotti, haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use support.TESTFN_UNDECODABLE on UNIX
versions: Python 3.4
Added file:

Python tracker <>
Python-bugs-list mailing list

Reply via email to