I am exploring repoze.bfg and trying to get a feeling of the whole framework
and past through the "so many things to know so little brain and time" wall :)
I read the book from cover to cover and wanted to take the opportunity to thank
the people at Repoze for the documentation and the book.
I wanted to use formish to evaluate form creation and after much fight was able
to display my form.
But when I try to put an unicode string in the description I have a traceback
at runtime like so
line 180, in cook_and_render
return func(econtext, rcontext)
File "<string>", line 160, in render
File "<string>", line 1, in __str__
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position
22: ordinal not in range(128)
My code is
pointValue_field=schemaish.Integer(description=(u"mesure de la complexité
relative de la fiche"),
of course removing the u"..." brings at runtime and expected
"File "<string>", line 185, in render
line 42, in getvalue
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 22:
ordinal not in range(128)
all my files have the # -*- coding: utf-8 -*- stance at the top of course.
I know unicode is a very complex beast so I wanted to know if people here could
point me at some basic obvious thing in my way of doing things or if some parts
of bfg/formish were known to have trouble with unicode string, or if it is a
formish problem entirely that I should bring to the formish developers.
I am willing to do tests as suggested.
thanks a lot for your time.
Repoze-dev mailing list