-
Notifications
You must be signed in to change notification settings - Fork 11
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
macOS quarantine issue appearing as Unicode error #83
Comments
I got a bit of log output which contains the first 100 bytes of the file. And these are the following: >>> b = b'\x00\x05\x16\x07\x00\x02\x00\x00Mac OS X \x00\x02\x00\x00\x00\t\x00\x00\x002\x00\x00\x0e\xb0\x00\x00\x00\x02\x00\x00\x0e\xe2\x00\x00\x01\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ATTR\xff\xff\xef\x17\x00\x00\x0e\xe2\x00\x00\x00\x98' We can then take a look and try to detect the character encoding: >>> import chardet
>>> chardet.detect(b)
{'encoding': 'Windows-1252', 'confidence': 0.73, 'language': ''} That means that this could be the As these are GPX files, the data of interest will be in the ASCII section and therefore should be fine with almost any encoding. So perhaps that will work out even if there is not the perfect code page there. Version 0.17.4 contains some experimental code with that. |
I've let the program emit the first 1000 bytes into the log. And there we find the string |
As the quarantine files start with a period, we can just skip those. That should make it more robust. |
A macOS user has trouble opening GPX files. They have sent me the file and I can open it on Linux. There is something weird going on. This is an example traceback:
In order to diagnose this further, I've added a bit more logging.
The text was updated successfully, but these errors were encountered: