Commits

Brian Kearns  committed ba47143

only apply this workaround for mbcs

  • Participants
  • Parent commits 26e0a68

Comments (0)

Files changed (1)

File lib-python/2.7/test/test_genericpath.py

         try:
             fsencoding = test_support.TESTFN_ENCODING or "ascii"
             asciival = unicwd.encode(fsencoding)
-            v = asciival.find('?')
-            if v >= 0:
-                raise UnicodeEncodeError(fsencoding, unicwd, v, v, asciival)
+            if fsencoding == "mbcs":
+                # http://bugs.python.org/issue850997
+                v = asciival.find('?')
+                if v >= 0:
+                    raise UnicodeEncodeError(fsencoding, unicwd, v, v, asciival)
         except (AttributeError, UnicodeEncodeError):
             # FS encoding is probably ASCII or windows and codepage is non-Latin1
             pass