Re: unicode custom messages in schemas
Adam Svanberg <[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
> 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. Keeping both does seem difficult, maybe if it's somehow possible to keep the msg-values as a (nested) list of strings and let the user sort out the mess in the end. I'm probably lacking some undrestanding of how it all fits together here, but maybe there could be one Invalid class for singles and another for compounds, and the single Invalid takes msg-strings while the compound one takes a list? But for the simpler either-or case, how about some kind of use_unicode_messages keyword for the schemas? ------------------------------------------------------- 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