[moin-user] ListPages macro doesn't work

Volker Wysk post at volker-wysk.de
Sun Sep 3 19:32:22 EDT 2017

Am Sonntag, 3. September 2017, 22:09:11 CEST schrieb Lars Kruse:
> Hello,
> Am Sun, 03 Sep 2017 20:24:57 +0200
> schrieb Volker Wysk <post at volker-wysk.de>:
> > ## The locale used by some modules like mod_dav
> > export LANG=C
> > ## Uncomment the following line to use the system default locale instead:
> > #. /etc/default/locale
> > 
> > I've done as suggested, and uncommented the fourth line, but with no
> > effect
> > on the ListPages macro.
> I could imagine that the following pieces are missing for this approach:
> 1) add "import locale" somewhere (probably at the top of the macro)
> 2) use "locale.strcoll" instead of "str.lower" or "unicode.lower" as
>    the "key" argument to "sort"

I've tried it, and now I get this error:

<<ListPages: Ausführung fehlgeschlagen [strcoll expected 2 arguments, got 1] 
(siehe auch die Log-Datei)>> 

(again, "execution failed...")
> I gues, this is not the "proper" way, since it uses the locale of the
> server and not the one of the client. But it probably helps in a
> single-locale environment.

This makes me wonder, how modified characters like "ä" or "á", which do not 
necessarily belong to the same locale, are treated by locale.strcoll... 


More information about the moin-user mailing list