#4886: Unicode Error -----------------------+---------------------------------------------------- Reporter: BBB | Owner: adrian Status: new | Component: Core framework Version: SVN | Keywords: unicode, fixtures, utf-8 Stage: Unreviewed | Has_patch: 0 -----------------------+---------------------------------------------------- Hello, I have save my fixtures files in UTF-8. And when I try to see the data in admin interface, I have this error message : UnicodeEncodeError at /admin/annonces/annonce/add/ 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128) Request Method: GET Request URL: http://127.0.0.1:8000/admin/annonces/annonce/add/ Exception Type: UnicodeEncodeError Exception Value: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128) Exception Location: C:\django_unicode\django\utils\encoding.py in force_unicode, line 40 Python Executable: C:\Python25\python.exe Python Version: 2.5.0 Traceback (most recent call last): File "C:\django_unicode\django\core\handlers\base.py" in get_response 77. response = callback(request, *callback_args, **callback_kwargs) File "C:\django_unicode\django\contrib\admin\views\decorators.py" in _checklogin 55. return view_func(request, *args, **kwargs) File "C:\django_unicode\django\views\decorators\cache.py" in _wrapped_view_func 39. response = view_func(request, *args, **kwargs) File "C:\django_unicode\django\contrib\admin\views\main.py" in add_stage 250. manipulator = model.AddManipulator() File "C:\django_unicode\django\db\models\manipulators.py" in __init__ 71. self.fields.extend(f.get_manipulator_fields(self.opts, self, self.change)) File "C:\django_unicode\django\db\models\fields\__init__.py" in get_manipulator_fields 245. field_objs, params = self.prepare_field_objs_and_params(manipulator, name_prefix) File "C:\django_unicode\django\db\models\fields\related.py" in prepare_field_objs_and_params 515. params['choices'] = self.get_choices_default() File "C:\django_unicode\django\db\models\fields\__init__.py" in get_choices_default 321. return self.get_choices() File "C:\django_unicode\django\db\models\fields\__init__.py" in get_choices 312. lst = [(getattr(x, self.rel.get_related_field().attname), smart_unicode(x)) for x in rel_model._default_manager.complex_filter(self.rel.limit_choices_to)] File "C:\django_unicode\django\utils\encoding.py" in smart_unicode 25. return force_unicode(s, encoding, strings_only, errors) File "C:\django_unicode\django\utils\encoding.py" in force_unicode 40. s = unicode(str(s), encoding, errors) UnicodeEncodeError at /admin/annonces/annonce/add/ 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128) I use SVN trunk version and I have the same error with Unicode branche.
-- Ticket URL: <http://code.djangoproject.com/ticket/4886> 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 -~----------~----~----~----~------~----~------~--~---
