Hi.

Meanwhile I've forced all values through a central dictionary constructing method that forces values into unicode object type right before posting and does:

for k,v in params:
    params[k] = unicode(v).encode("UTF-8")

That along with content_type set to application/x-www-form-urlencode; charset=UTF-8 seems to work. I don't know why .encode() didn't work before and I haven't investigated. Meanwhile, I still think this is an issue, WebTest should be able to post and encode unicode data properly. I've raised the issue here:

https://bitbucket.org/ianb/webtest/issue/25/params-dictionary-of-webtestapptestpost



Thanks!

.oO V Oo.


On 10/25/2011 04:42 PM, Gael wrote:
'data=\xc3\xa9'

The solution is to encode the body by yourself. ( post(params=body) )

Can you open an issue on the bitbucket tracker ?
https://bitbucket.org/ianb/webtest/issues?status=new&status=open
I'll try to have a look at this.

--
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to