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

UnicodeDecodeError on urls with percent encoded non-ascii symbols #117

Closed
w0rm opened this issue Nov 6, 2011 · 2 comments
Closed

UnicodeDecodeError on urls with percent encoded non-ascii symbols #117

w0rm opened this issue Nov 6, 2011 · 2 comments
Milestone

Comments

@w0rm
Copy link

w0rm commented Nov 6, 2011

Any webpy app throws this exception, no matter what.

I think it is a bug, to reproduce it try to run example from the main page of webpy's website, and open this url:

http://localhost:8080/%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0

@anandology
Copy link
Member

Working for me.

$ curl 'http://localhost:8080/%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0'
Hello, проверка!

@anandology
Copy link
Member

Stripping one letter at the end is causing error.

$ curl 'http://localhost:8080/%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0'
Traceback (most recent call last):
  ...
  File "/Users/anand/work/webpy/gae/issue80/web/utils.py", line 331, in safeunicode
    return obj.decode(encoding)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd0 in position 15: unexpected end of data

I think this should be fixed.

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

2 participants