Re: unicode custom messages in schemas
Ian Bicking <[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
Adam Svanberg wrote: > I'm having some problems trying to use unicode strings as custom messages. > > formencode.schema.format_compound_error: > > if isinstance(v, Exception): > return str(v) > > I'm really not sure what the best solution would be here. I too am unsure. If I change that to unicode() instead of str(), then everything will be unicode, which means any non-ascii strings will break the system. And maybe that's fine. But I can't think of any way to keep str stuff as str, and unicode stuff as unicode. -- Ian Bicking / [email protected] / http://blog.ianbicking.org ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642