Workaround issue #8611 in test_undecodable_code() of test_sys

Write test.support.workaroundIssue8611() function so it will be easier to
remove this workaround from all tests.
diff --git a/Lib/test/support.py b/Lib/test/support.py
index d0e84c7..814d061 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -1277,3 +1277,11 @@
     """
     stderr = re.sub(br"\[\d+ refs\]\r?\n?$", b"", stderr).strip()
     return stderr
+
+def workaroundIssue8611():
+    try:
+        sys.executable.encode('ascii')
+    except UnicodeEncodeError:
+        raise unittest.SkipTest(
+            "Issue #8611: Python doesn't support ascii locale encoding "
+            "with an non-ascii path")