Brodie Rao committed 055486b

Fix encodeinput() blowing up stuff on Windows

Comments (0)

Files changed (1)

     For Python 2, this returns the string as-is. For Python 3, it encodes it
     based on the locale (to match open() decoding in the same manner).
-    if sys.version_info == 2:
+    # This is absurd. Surely there's a better way?!
+    if sys.platform == 'win32' or sys.version_info == 2:
         return s
     return s.encode(locale.getpreferredencoding())