Skip to content
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

Bangle backup does not work if filenames contain umlauts. #49

Open
halemmerich opened this issue Jul 23, 2023 · 3 comments
Open

Bangle backup does not work if filenames contain umlauts. #49

halemmerich opened this issue Jul 23, 2023 · 3 comments

Comments

@halemmerich
Copy link
Contributor

Console contains:

<COMMS> showMessage "Backing up..."
comms.js:432 Uncaught (in promise) URIError: URI malformed
    at decodeURIComponent (<anonymous>)
    at Array.map (<anonymous>)
    at comms.js:432:25
@gfwilliams
Copy link
Member

Thanks - is there some app that's generating files with umlauts, or was it just something you uploaded via the IDE?

Just to check - these are going to the characters with char codes between 128..255 (not unicode or anything). It sounds like the issue is probably when trying to write the named file into a zip, so maybe we should just change any char codes above 128 to ? or similar

@halemmerich
Copy link
Contributor Author

This was by caused by uploading GPX files for GPS Trekking so the umlaut initially came from the local file name of the .gpx. The IDE seems to somehow specially handle these file names as they were displayed in quotes in the file overview. Easy enough to avoid if known but inconvenient.
I'll have to check later what char codes actually result after uploading and if this differs between IDE and GPS Trekking, since the system I uploaded the files from has set unicode locales everywhere.

@halemmerich
Copy link
Contributor Author

Upload of a file named TestÄßê.trf via IDE and GPS Trekking creates the same file name on the bangle.
Storage.list() shows it as "Test\xC4\xDF\xEA.trf"

So yes, seems to be only extended ASCII. Replacing those with ? would help, but restoring those backups of course would be not really identical to the original. Maybe that would cause problems with some apps that store filenames while most should handle the case of a file going missing.

Both print(require("Storage").read("Test\xC4\xDF\xEA.trf")) and print(require("Storage").read("TestÄßê.trf")); work fine when sent from the IDE to RAM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants