I have found a solution in the mailing list:
The reference is "Something changed with regards to unicode since
r765?"
The solution proposed by Bjorn is :
"I used to have the exact same problem, but creating a file
sitecustomize.py in /usr/lib/python2.4/site-packages like this solved
all my problems:
import sys
sys.setdefaultencoding("utf-8")
I did it and it works on my system. Sorry for the noise on the list...
Arnold
Arnold wrote:
> I wish to internationalize a TG application.
> I set UTF-8 everywhere (templates, code...)
> The problem is the same for IE and FireFox
> A "ç" or "é" character input in a text form leads the following
> error:
>
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
> 45: ordinal not in range(128)
>
> Here is my investigation of the problem:
> é is Unicode E9, so it's encoded "c3 a9" in UTF-8. The browser sends
> correctly in UTF-8.
> TG however, tries to interpret the UTF-8 encoded as ascii. Of course,
> c3 is greater than 128! and it fails. I can't manage to force TG to
> directly interpret UTF-8, it sticks to ASCII.
>
> So my question: how can I force the TG input filter to interpret UTF-8
> ?
>
> Any idea ?
> Thanks
> Arnold
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---