Commit 8ce7df67 authored by Victor Stinner's avatar Victor Stinner

Issue #9819: fix TESTFN_UNENCODABLE for japanese code page

parent 2314fc72
...@@ -394,8 +394,9 @@ TESTFN_UNENCODABLE = None ...@@ -394,8 +394,9 @@ TESTFN_UNENCODABLE = None
if os.name in ('nt', 'ce'): if os.name in ('nt', 'ce'):
# skip win32s (0) or Windows 9x/ME (1) # skip win32s (0) or Windows 9x/ME (1)
if sys.getwindowsversion().platform >= 2: if sys.getwindowsversion().platform >= 2:
# Japanese characters (I think - from bug 846133) # Different kinds of characters from various languages to minimize the
TESTFN_UNENCODABLE = TESTFN + "-\u5171\u6709\u3055\u308c\u308b" # probability that the whole name is encodable to MBCS (issue #9819)
TESTFN_UNENCODABLE = TESTFN + "-\u5171\u0141\u2661\u0363\uDC80"
try: try:
TESTFN_UNENCODABLE.encode(TESTFN_ENCODING) TESTFN_UNENCODABLE.encode(TESTFN_ENCODING)
except UnicodeEncodeError: except UnicodeEncodeError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment