maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] [PATCH maposmatic] Sort available countries in alph


From: Maxime Petazzoni
Subject: Re: [Maposmatic-dev] [PATCH maposmatic] Sort available countries in alphabetical order
Date: Wed, 10 Feb 2010 20:39:06 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

H,

* David MENTRE <address@hidden> [2010-02-10 20:02:42]:

> 2010/2/10 David MENTRE <address@hidden>:
> > I'll look at it. No guarantee though.
> 
> Ok, I could not found any specific Python function to do the correct
> compare. Maybe I have overlooked something, let me know.

After a bit of research, it looks like Python can't correctly compare
unicode strings because it does order-based comparison instead of using
a UCA (Unicode Collation Algorithm, http://unicode.org/reports/tr10/).

There doesn't seem to be an easy-to-use, packaged Python UCA, and Django
doesn't seem to be of any help here either.

> A simple solution would probably to go back to the old list and sort
> it manually.

I think it's good enough for now. Especially since the ordering is
actually language-dependant, we won't be able to provide a correctly
sorted list anyways.

- Maxime
-- 
Maxime Petazzoni <http://www.bulix.org>
 ``One by one, the penguins took away my sanity.''
Linux kernel and software developer at MontaVista Software

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]