-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
non-ASCII characters in filenames break git ls-files parsing #23
Comments
Caused by a file named é.txt in the source repository. check-manifest should be changed to parse that correctly. |
And now I've got Windows Jenkins failures due to this test. :(
|
With the following change I get two failures instead of four: diff --git a/tests.py b/tests.py
index 3b7e096..c9f52e1 100644
--- a/tests.py
+++ b/tests.py
@@ -681,6 +681,8 @@ class TestZestIntegration(unittest.TestCase):
class VCSHelper(object):
def _run(self, *command):
+ import locale
+ command = [s.encode(locale.getpreferredencoding()) for s in command]
p = subprocess.Popen(command, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
stdout, stderr = p.communicate() The failures are:
The expected value is |
For the record, |
Incidentally, this repo (hhatto/autopep8) cannot be checked with latest check-manifest master on Windows because git treats filenames as bytes and doesn't convert UTF-8 to the locale encoding (cp1252), and then check-manifest fails:
|
I'm actually surprised -- don't all the Win32 APIs have Unicode versions? Eh, Python. Related to issue #23.
I'm closing this issue and creating #26 for the remainder. I should probably also create an issue for "check-manifest can't deal with filenames not expressible in your locale", i.e. the above comment, but it seems like a large task and I don't know how to approach it. Let's wait for users to complain (and, perhaps, offer solutions). |
FWIW this error just disappeared for no reason. Maybe there's something different in my environment that doesn't show up in a Jenkins job. |
I'm not sure whether I tried check-manifest on this repository before. So I'm not sure whether this is a regression or whether it never worked before. I can reproduce this on
0.18
and0.19.dev0
. I've seen this on Python 3.3, but it seems to also occur if I try Python 2.7.The text was updated successfully, but these errors were encountered: