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

Support latin1 strings with ascii target_url's #2

Closed
twolfson opened this issue Apr 20, 2015 · 1 comment
Closed

Support latin1 strings with ascii target_url's #2

twolfson opened this issue Apr 20, 2015 · 1 comment

Comments

@twolfson
Copy link
Contributor

We have encountered a regression when an ascii target_url attempts to use a latin1 string in its target URL. We should support proper coercion:

>>> resolve_link.resolve_link('twolfson', 'http://github.com/')
'http://github.com/twolfson'
>>> resolve_link.resolve_link(u'twolfsõn', 'http://github.com/')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "resolve_link/__init__.py", line 26, in resolve_link
    tmp_src_url = '//{src_url}'.format(src_url=src_url)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf5' in position 6: ordinal not in range(128)
@twolfson
Copy link
Contributor Author

This has been fixed in #3 and released as 1.1.0.

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

1 participant