UnicodeEncodeError when entering Unicode character in DecimalField
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)
Change History
(6)
Has patch: |
set
|
Summary: |
UnicodeEncodeError when entering Unicode character in DecimalField → [Patch] UnicodeEncodeError when entering Unicode character in DecimalField
|
Needs tests: |
set
|
Summary: |
[Patch] UnicodeEncodeError when entering Unicode character in DecimalField → UnicodeEncodeError when entering Unicode character in DecimalField
|
Triage Stage: |
Unreviewed → Accepted
|
Resolution: |
→ wontfix
|
Status: |
new → closed
|
Yuck.