On 11/30/06, gabor <[EMAIL PROTECTED]> wrote: > but if i want to render it in a template and it contains non-ascii text, > it fails in /home/gabor/src/django/django/template/__init__.py, > line 745, UnicodeEncodeError. > > the code there calls str() on the form, and it's a problem because it > calls Form.__str__, which in turn calls as_table, which returns unicode > data. > which is then converted to bytestring, by the default-charset (ascii), > and that fails.
Thanks for bringing this up. A clean way to solve the problem would be to change the template system to convert any Unicode objects to bytestring according to DEFAULT_CHARSET. What do you think? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
