On Fri, Apr 24, 2009 at 12:24 AM, space0x42 <simone.bett...@gmail.com>wrote:

>
> HI all
>
> This is puzzling me:
> django 1.0 with a mysql database, innodb engine, database created with
> "character set utf8 collate utf8_general_ci."
>
> Filtering by object name is insensitive to stressed chars!
>
> EntityType.objects.get(name='sven') returns the same object of
> EntityType.objects.get(name='svèn')...
>
> This problem is generic, I did several test, both with objects named
> with stressed chars and objects with plain names and I always have
> both get and filter return the same object despite I pass stressed or
> plain version of name...
>
> Did some google search about this, but didn't find anything...am I
> missing something obvious?
>

This is due to MySQL's default collation. Though the doc here:

http://docs.djangoproject.com/en/dev/ref/databases/#collation-settings

only explicitly calls out case sensitivity the effect you are seeing with
accented characters is due to the same cause.  The doc linked above points
to the MySQL doc for more information, and gives some guidance on what
you'll need to do if you want to change to a stricter (binary equality)
collation.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to