• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item3680: I18N: Sorting does not match locale settings

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TablePlugin Normal New   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Sorting in twiki tables, searchresults etc. does not match locale settings. Adding lines

            require POSIX;
            import POSIX qw( locale_h LC_CTYPE LC_COLLATE);
            setlocale(&LC_COLLATE, $TWiki::cfg{Site}{Locale});
to Search.pm and other related modules fixes the problem Tests shows that LC_CTYPE was correct there, but LC_COLLATE wrong.

Settings are the same as in Item3679

-- TWiki:Main/SergejZnamenskij - 23 Feb 2007

As discussed elsewhere, the fix is to do a similar setlocale call during initial TWiki.pm locale setup. Something like this should work:

    setlocale(&LC_CTYPE, $TWiki::cfg{Site}{Locale});     *setlocale(&LC_COLLATE, $TWiki::cfg{Site}{Locale});* 
-- TWiki:Main.RichardDonkin - 04 Mar 2007

Sergej. We clearly need someone with both knowledge and interest in i18n and perl to drive the development of TWiki in this direction. The regular developers do not seem to have the i18n knowledge that is requires.

Do you have SVN checkin rights Sergej? Otherwise you should apply and participate as a developer. Our developer community is not that large and there is room for much more to drive the development.

-- TWiki:Main.KennethLavrsen - 04 Mar 2007

Sergej doesn't have checkin rights, but is quite interested in doing I18N (see TWiki:Codev.InternationalisationGuidelines discussion) - I've emailed him to point to this page.

-- TWiki:Main.RichardDonkin - 05 Mar 2007

The fix committed for Item3652 included a line to set LC_COLLATE, so this should now be fixed - needs testing.

-- TWiki:Main.RichardDonkin - 11 Sep 2007

Current MAIN (r14866) doesn't seem to sort correctly for our locale here (I only tried sorting by clicking headers generated by TablePlugin).

-- TWiki:Main.SteffenPoulsen - 14 Sep 2007

That may well be a bug in TablePlugin - is it using locales properly as per the internationalisation guidelines (linked from I18N)?

The core sorting code using locales can be tested using WebIndex.

-- TWiki:Main.RichardDonkin - 30 Sep 2007

WebIndex sorts as it should here - excellent. Probably an item against I18N support for TablePlugin would make sense.

-- TWiki:Main.SteffenPoulsen - 30 Sep 2007

Reattributing to TablePlugin. Minor testcase (danish locale):

H1 H2 Correct H2 sort order, da locale
abc def 2
def abc 1
æøå åøæ 4
åøæ æøå 3

-- TWiki:Main.SteffenPoulsen - 22 Dec 2007

WebIndex does not sort correctly.

It consequently sorts ÆØÅ as ÅÆØ. Both in tables and in tables. Even when I define the locale as $TWiki::cfg{Site}{Locale} = 'da_DK.ISO-8859-1';

I noted the same problem in a Codev topic written by Richard about some perl lib that should be good for sorting. It did not know the Danish alphabeth either.

Either the locale setting sucks or the CPAN libs are buggy and have been for a long time.

-- TWiki:Main.KennethLavrsen - 29 Jul 2008

ItemTemplate
Summary I18N: Sorting does not match locale settings
ReportedBy TWiki:Main.SergejZnamenskij
Codebase 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.1.0, 4.1.1
SVN Range TWiki-4.1.1, Tue, 20 Feb 2007, build 12932
AppliesTo Extension
Component TablePlugin
Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r11 - 2008-07-29 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback