Friday, September 9, 2011

Re: Norwegian Sorting

На Fri, 09 Sep 2011 22:18:50 +0100
Tim Sawyer <list.django@calidris.co.uk> написа:

> Hi Folks,
>
> I have a django site which is against a postgres database which is
> UTF8. I have a large droplist with international names in, and it
> doesn't appear to be sorting correctly.
>
> The list contains Ingvar Mæland and Børre Børresen. I'm told that
> the Norwegian sort order should be X Y Z Æ Ø Å. That's not what I'm
> seeing
> - I think it's just sorting them as A's.
>
> I found Ingvar Mæland in the place I would expect to find Maland
>
> I found Børre Børresen in the place I would expect to find Barresen
>
> LANGUAGE_CODE = 'en-gb', in settings.py.
>
> Does anyone know what I've missed?

You probably have problem in the postgres itself. I had simmilar
problems with mysql, where it returns "a" and "a" with some diacritical
mark when I do select with where clause which searches for one of them.

So better try to make the same query directly in some postgres client
to see if the result is broken.

And here two mails, which discuss your problem from other mailing lists:
http://archives.postgresql.org/pgsql-novice/2007-09/msg00066.php
http://freebsd.1045724.n5.nabble.com/Enabling-norwegian-sorting-rules-in-PostgreSQL-td4256621.html

> Thanks,
>
> Tim.
>

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate