[Zope-dev] dtml-in: sort is not locale-aware

2000-06-20 Thread Oleg Broytmann

Hello!

   Currently dtml-in does not use locale when sorting the sequence. Before
creating a patch I want to discuss a way dtml-in should handle this. The
problem is that list.sort() does not sort according to koi8-r cyrillic
locale; to make sort locale-aware I need to list.sort(locale.strcoll).
   But how I could ask dtml-in to use locale.strcoll? Should I add another
option to dtml-in? Something like
   dtml-in somesequence sort=name use_locale ?

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] dtml-in: sort is not locale-aware

2000-06-20 Thread Oleg Broytmann

On Tue, 20 Jun 2000, mike wrote:
 But how I could ask dtml-in to use locale.strcoll? Should I add another
  option to dtml-in? Something like
 dtml-in somesequence sort=name use_locale ?
 
 I use dtml-in "ru_sort( somesequence)"
 A bit slower but works like hammer.

   I want to use all power of dtml-in and other zope tools. There are
things where I can just write my functions and methods; and there are cases
so general that it's more correct to extend zope functionality.

   Do you know that latest version of Zope can sort by multiple keys? How
do you extend your ru_sort() to reflect the change?

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )