Skip to content

Conversation

@auouymous
Copy link
Member

sanitize_filename() only counts the number of characters and not the multi-byte UTF-8 sequences. This patch converts the string to an array of UTF-8 bytes and then removes each multi-byte sequence until the length is below the limit.

sanitize_filename() only counts the number of characters and not the
multi-byte UTF-8 sequences. This patch converts the string to an array
of UTF-8 bytes and then removes each multi-byte sequence until the
length is below the limit.
@computerfreak105
Copy link

computerfreak105 commented Jul 31, 2024 via email

@auouymous
Copy link
Member Author

Will this fix be available in the next mac artifact?

It will be merged into gpodder in a few days assuming no one finds issues with it. I have been using it without problem, and if you want to test it, download http://borg.qzx.com/files/gpodder/util.py and overwrite the uitl.py file with it. I don't know where it is on Mac but it is at /home/appveyor/_gpodder_build_root/mingw32/lib/python3.11/site-packages/gpodder/util.py in the Windows build.

The Mac build, like the Windows build, is currently broken. The simplest option is to require macos-14, and everyone on 12 and 13 would be left out. The other option is to move from CircleCI to Github, but that eliminates public access to the artifacts. I should have some time in a couple days to work on it some more, and hopefully it just builds without needing either of those options.

@computerfreak105
Copy link

computerfreak105 commented Aug 1, 2024 via email

@computerfreak105
Copy link

computerfreak105 commented Aug 1, 2024 via email

@auouymous auouymous merged commit 6d6bd7e into gpodder:master Aug 5, 2024
@auouymous auouymous deleted the sanitize-utf8-filenames branch August 5, 2024 08:54
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

Successfully merging this pull request may close these issues.

2 participants