#3370: [patch] newforms: form.save() raises UnicodeEncodeError when form 
contains
any non latin characters
---------------------------------+------------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  adrian         
     Status:  new                |            Component:  django.newforms
    Version:  SVN                |           Resolution:                 
   Keywords:                     |                Stage:  Unreviewed     
  Has_patch:  1                  |           Needs_docs:  0              
Needs_tests:  1                  |   Needs_better_patch:  0              
---------------------------------+------------------------------------------
Comment (by [EMAIL PROTECTED]):

 Michael, #1356 - yes this does the same thing as a part of my patches.
 Only thing is missed in both patches is that we should not change charset
 if we use MySQL 4.0 and I think it needs to be checked.
 
 About #3314 - it is good patch but it does not fix the following problem:
 {{{
 >>> from myproject.models import *
 >>> t = Tariff.objects.get(pk=1)
 >>> t
 Traceback (most recent call last):
   File "<console>", line 1, in ?
   File "/usr/lib/python2.4/site-packages/django/db/models/base.py", line
 80, in __repr__
     return '<%s: %s>' % (self.__class__.__name__, self)
 UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7:
 ordinal not in range(128)
 }}}
 where str(t) looks like this:
 {{{
     def __str__(self):
         return self.name
 }}}
 and name contains unicode non-latin characters
 
 I'm going to upload a better patch that fixes my problems and that should
 work ok with mysql 4.0

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3370#comment:5>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to