Hello, I collided with url encoding between Python and JavaScript, I hope you can help me : S
Javascript:
EncoderIconPonentant ('Lo'); - & gt; "L% C3% B4l"
Python:
import urlib test = container.REQUEST.form.get ('test') print print print urllib .key (test) - & gt; "Lail" - & gt; "LÃŽl" javascript encodes "lôl" twice but the dragon does that once, I do not know how to run away from it, because I get anyway that the prototype HTTP request "L% C3% ** Edit it on a zope webserver
zopo Already decodes the URL - the issue is that you are getting a UTF-8 biotech and print it on non-UTF-8 terminal Try to decode the string.
x = 'l \ xc3 \ xb4l' Unicode_x = x.decode ('utf-8') Print Unicode_x
No comments:
Post a Comment