[z3-five] Re: Extended characters in forms
Lennart Regebro
regebro at gmail.com
Mon May 23 11:24:26 CEST 2005
On 5/23/05, Martijn Faassen <faassen at infrae.com> wrote:
> >>1. Force people to change the default encoing in site.py.
>
> This we cannot possibly recommend, as this is evil and will break other
> stuff...
Dieter came up with this:
"sys.setdefaultencoding(some_appropriate_encoding_fitting_the_sites_encoding)"
in "sitecustomize.py"
It's basically the same, but sitecustomize.py can be put anywhere in
the python-path. The question is what the pythonpath is when it's
sucked in, but I'm going to look at this. It's still not a very great
solution, but at least a usable workaround.
> >>3. Do some magic so everything in these forms is converted to unicode
> >>with the charset encoding in the for request.
> >
> > I tried #3, and you get problems with things that are for example
> > lists of strings, so that didn't work.
>
> Hm, how did you try #3? I think #3 is most similar to what the Zope 3
> publisher itself does, though I still need to go study it.
I tried making the editform and addform view-classes do this
convertion. But, you get problems with things that are not pure
strings, like lists and stuff. It should, I guess, be done in the
Zope2 publisher, which is not a prospect I particularily look forward
to trying at the moment.
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
More information about the z3-five
mailing list