Anil wrote:
> I have:
>     def reset(self):
>         """ Reset password for email given in POST arguments """
>         from formencode import validators
> 
>         mail_validator = validators.Email(not_empty=True)
>         try:
>             mail = request.params.get("mail")
>             mail_validator.to_python(mail)
>         except validators.Invalid, e:
>             return e
> 
> Which is called through a AJAX h.submit_to_remote call, which updates
> a DIV element with the "e".
> 
> 
> Actually, I sent an email to Allan before, and he sent:
> 
> The application/framework is responsible for all encoding/decoding,
> according to the WSGI spec:
> 
> http://www.python.org/dev/peps/pep-0333/#unicode-issues
> 
> The WSGI interface only supports plain strings.

Ah... I thought the exception was from the flup error handler trying to 
format the exception somehow.

Probably whatever calls reset() should do return 
unicode(self.reset()).encode('utf8')

-- 
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org

--~--~---------~--~----~------------~-------~--~----~
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