01210: pagelist collation

Summary: pagelist collation
Created: 2010-06-28 18:32
Status: Closed
Category: Feature
From: CarlosAB
Assigned:
Priority: 1
Version: latest
OS: freebsd/apache/php 5.2

Description: I don't know if/how collation is provided by pagelist, but since the aim of pmwiki AFAIK is to be a multilanguage wiki that uses utf-8 to achieve it, I think I have found something interesting AND simple for collation.

Take a look a the end in:

http://www.mediawiki.org/wiki/Bugzilla/collation_by_locale

I believe pagelist collation is probably "LC_COLLATE=C"...

Please comment my non-sense.

CarlosAB June 28, 2010, at 06:32 PM

Hello. Currently PmWiki uses the strcasecmp() function which is very fast but doesn't work well with UTF-8 strings and I'm not sure it respects LC_COLLATE for single-byte strings. I have used this snippet to sort a pagelist in a French language wiki. For a wiki in UTF-8, you can change the setlocale line to setlocale(LC_COLLATE, 'fr_FR.utf8'); instead of just fr_FR. --Petko November 09, 2010, at 07:01 AM

Thanks Petko, that is exactly what I was looking for and also finally learned about CustomPagelistSortOrder.I'm closing this entry. CarlosAB February 03, 2011, at 02:50 PM