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

Use unicode strings to avoid UnicodeEncodeError #1040

Closed
wants to merge 1 commit into from
Closed

Use unicode strings to avoid UnicodeEncodeError #1040

wants to merge 1 commit into from

Conversation

jbnance
Copy link

@jbnance jbnance commented Mar 9, 2016

The URL module chokes when looking up the title of web pages that include unicode with the following error:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position 403: ordinal not in range(128) (file "/opt/willie/venv/lib/python2.7/site-packages/sopel/modules/url.py", line 191, in find_title)

(have it look up sopel-irc/sopel-extras#78 for an example)

Avoid this issue by handling strings as unicode.

@elad661
Copy link
Contributor

elad661 commented Mar 9, 2016

Thank you for your pull request. I can't merge it because I've already merged a different pull request which fixed this issue ( #1028 ). Sorry.

@elad661 elad661 closed this Mar 9, 2016
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