﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3974	UnicodeEncodeError for models with accentued __str__ (newforms-admin)	Baptiste <baptiste.goupil@…>	Adrian Holovaty	"A model with a custom _ _str_ _ method :
{{{
	def __str__(self):
		return self.name
}}}

If you try to add an item with an accent in the field ''name'':
{{{
Traceback (most recent call last):
File ""/usr/lib/python2.4/site-packages/django/core/handlers/base.py"" in get_response
  77. response = callback(request, *callback_args, **callback_kwargs)
File ""/usr/lib/python2.4/site-packages/django/contrib/admin/sites.py"" in root
  123. return self.model_page(request, *url.split('/', 2))
File ""/usr/lib/python2.4/site-packages/django/contrib/admin/sites.py"" in model_page
  140. return admin_obj(request, rest_of_url)
File ""/usr/lib/python2.4/site-packages/django/contrib/admin/options.py"" in __call__
  138. return self.add_view(request)
File ""/usr/lib/python2.4/site-packages/django/contrib/admin/options.py"" in add_view
  403. return self.save_add(request, model, form, '../%s/')
File ""/usr/lib/python2.4/site-packages/django/contrib/admin/options.py"" in save_add
  306. LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(model).id, pk_value, str(new_object), ADDITION)

  UnicodeEncodeError at /admin/model/model/add/
  'ascii' codec can't encode character u'\xe0' in position 9: ordinal not in range(128)
}}}

But the item is added to the database, and can be seen without problem in the admin site after that.If we want to edit it, the validation of the form raises the same error, but again, changes are correctly saved."		closed	contrib.admin	newforms-admin		invalid	newforms-admin		Unreviewed	0	0	0	0	0	0
