-
Notifications
You must be signed in to change notification settings - Fork 820
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
Unicode path handling #14
Comments
Thanks. I imagine this is going to be a problem with certain locales as well. Is this IPA one you can share with me? |
Sure! It's just a quick test app I threw together in xcode. Should be attached to this comment. |
So I jumped down the rabbit hole - it's an issue with zipfile.ZipFile() guessing the wrong encoding for the extracted filenames. We'll see how GitHub handles the below output, hopefully it's legible:
So! I found a few python issue tickets (such as https://bugs.python.org/issue28080), but it doesn't look like there's a simple way to programmatically guess the encoding of the zip file. The errors I initially posted in this issue stem from the fact that we use
which gets the properly-encoded name from the plist file, regardless of how the actual filename is decoded from the zip file. If the filename decodes properly from the zip file, this will work. If it doesn't, the binary referenced by the above won't be present in the unzipped archive. Additionally, re-packaging an IPA with incorrectly encoded filenames will cause a similar mismatch when a user tries to install or run a modified IPA. I'm not sure of the best way to proceed here. Compare the filename in the plist with the extracted filename, perhaps, and use that as a way to determine valid encodings? |
Thanks for looking into this. You rock! 🤘 I will also try a few things to see if I can find a way to handle unicode better. |
@leonjza I fixed this in a local branch by using system's |
Excellent @pachoo. Do you want to create a PR for those changes? |
Closing due to age. |
Yet another path-related bug. Non-ASCII characters in the name of the app bundle appear to cause gruesome issues with insert_dylib. I can try and dig into this further - as a quick workaround, I've found extracting the .ipa, renaming the offending .app folder and binary, and updating the Info.plist to have an ASCII-only name will allow the process to work.
The text was updated successfully, but these errors were encountered: