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

fix bug with unicode char in urls #5

Merged
merged 1 commit into from
Feb 27, 2021
Merged

Conversation

Shaked
Copy link
Contributor

@Shaked Shaked commented Feb 26, 2021

This fixes a problem with URLs with UTF8 chars, e.g:

echo "http://www.shakedos.com:80/index.php/2010/05/עבודה-עם-שפות-ללא-טבלאות-מוכנות/feed/" > /tmp/urls.txt
uddup -u /tmp/urls.txt 
...
Traceback (most recent call last):
  File "/usr/local/bin/uddup", line 11, in <module>
    sys.exit(interactive())
  File "/usr/local/lib/python3.5/dist-packages/uddup/main.py", line 269, in interactive
    main(args.urls_file, args.output, args.silent, args.filter_path)
  File "/usr/local/lib/python3.5/dist-packages/uddup/main.py", line 184, in main
    for url in f:
  File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 100: ordinal not in range(128

@rotemreiss rotemreiss self-assigned this Feb 27, 2021
@rotemreiss rotemreiss added bug Something isn't working good first issue Good for newcomers labels Feb 27, 2021
@rotemreiss rotemreiss added this to the v0.9.3 milestone Feb 27, 2021
@rotemreiss rotemreiss merged commit 39f8e52 into rotemreiss:master Feb 27, 2021
rotemreiss added a commit that referenced this pull request Feb 27, 2021
rotemreiss added a commit that referenced this pull request Feb 27, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants