#5809: UnicodeEncodeError when entering Unicode character in DecimalField
-----------------------+----------------------------------------------------
Reporter: webjunkie | Owner: nobody
Status: new | Component: Contrib apps
Version: SVN | Keywords: unicode decimalfield oldforms
Stage: Unreviewed | Has_patch: 0
-----------------------+----------------------------------------------------
When you have a DecimalField and you enter a Unicode character like it
doesn't just invalidate, it gives you an error.
{{{
Traceback (most recent call last):
File "c:\django_src\django\core\handlers\base.py" in _real_get_response
81. response = callback(request, *callback_args, **callback_kwargs)
File "c:\django_src\django\contrib\auth\decorators.py" in _checklogin
17. return view_func(request, *args, **kwargs)
File "xx" in xx
764. errors = manipulator.get_validation_errors(new_data)
File "c:\django_src\django\oldforms\__init__.py" in get_validation_errors
61. errors.update(field.get_validation_errors(new_data))
File "c:\django_src\django\oldforms\__init__.py" in get_validation_errors
378. self.run_validator(new_data, validator)
File "c:\django_src\django\oldforms\__init__.py" in run_validator
368. validator(new_data.get(self.field_name, ''), new_data)
File "c:\django_src\django\oldforms\__init__.py" in isValidDecimal
789. v(field_data, all_data)
File "c:\django_src\django\core\validators.py" in __call__
435. val = Decimal(field_data)
File "C:\Programme\Python24\lib\decimal.py" in __new__
544. if _isinfinity(value):
File "C:\Programme\Python24\lib\decimal.py" in _isinfinity
2930. num = str(num).lower()
UnicodeEncodeError at /example/
'ascii' codec can't encode character u'\u20ac' in position 3: ordinal
not in range(128)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/5809>
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
-~----------~----~----~----~------~----~------~--~---