-
Notifications
You must be signed in to change notification settings - Fork 17
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
Bugfix/unicode support #77
base: main
Are you sure you want to change the base?
Conversation
…racters. I don't remember exactly what the problem is, but I believe it had to do something with how the = operator and string objects don't play perfectly well together when it comes to unicode and need to be handled delicately. This fix is backported from a dead pull request from 2022 that I half remember working on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code should be using pathlib, it makes it easier to use throughout the codebase
Should be good now |
I used this branch today ( When downloading: When restart downloading (so it will use local files?):
|
I need to test this, but I think I understand what's going on here, it's trying to call rename on an object that still purely a string and not a |
Pertains to issue #74
This PR fixes a bug that occurs when downloading files that use UTF-8 characters, the characters they're meant to represent will get "smeared" into a different encoding format, the root cause I believe is this line in utils.py:
#filename_re = re.search(r'filename="(.+)"', cd)
What's going on here has something to do either with re.search returning an ascii formated byte string, or a weird consequence of passing the string through the assignment operator. My memory is a bit hazy on the specifics. in addition to fixing that issue the directory handling code was improved in other sections, using existing functions to replace blocks of code and making the variable names slightly more readable.
Also apologies for the weird duplicate commits on the branch, I'm a little rusty with git.