Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Text-sorting within listgrid with german umlauts

    Hi there,

    Working with the paged treegrid-datasource (not another issue for the paged treegrid) i'm stumpled upon the sorting algorithm for non english characters. We are using the german locale.

    In the german language there are 2 differnt ways to deal with sorting of words with for example ö.

    If you have a set of names: Börner, Bösch, Bösel, Böttcher, Bojer, Bolanz, Born, Boutel, Bouwer.

    The first way is the default case which is used in most of the cases.
    The ö is replaced with a "oe", so its sorted like this:
    Börner
    Bösch
    Bösel
    Böttcher
    Bojer
    Bolanz
    Born
    Boutel
    Bouwer

    The second way to sort the names is to replace replace the ö with a simple "o". The result changes to
    Bojer
    Bolanz
    Born
    Börner
    Bösch
    Bösel
    Böttcher
    Boutel
    Bouwer

    You can take a look at this even at wikipedia. At the german wikipedia it's also described in detail german wikipedia
    In German letters with umlaut (Ä, Ö, Ü) are treated generally just like their non-umlauted versions; ß is always sorted as ss. This makes the alphabetic order Arg, Ärgerlich, Arm, Assistant, Aßlar, Assoziation. For phone directories and similar lists of names, the umlauts are to be collated like the letter combinations "ae", "oe", "ue" because a number of German surnames appear both with umlaut and in the non-umlauted form with "e" (Müller/Mueller). This makes the alphabetic order Udet, Übelacker, Uell, Ülle, Ueve, Üxküll, Uffenbach.
    Because working in listgrids are similar to list of names, the normal sorting for a lit in the listgrid/treegrid should be to replace the "ö"-Character with a "oe".

    Is there a chance to archieve this different sorting in the treegrid and in the listgrid?
    We currently working with SmartClient_v100p_2015-05-05_Pro.

    Background: In our treeGrid Datasource, we are indeed using the default sorting method for german lists (replacing "ö" with "oe").
    So the datasource return this sorting

    If i change the sorting twice, the same sorting should be archieved but after sorting this is the resutl


    The problem is after entering the view, the datasource catches the data and displays it as delivered. The [+] symbol in on the second node. If the user tries to click the [+] noting changes. If you click on the incorrect position, where it would be with the "smartclient"sorting (replacing "ö" with "oe") the tree resorts and opens the node with the childs.

    (At this example i had 2 nodes with the title "Böttcher")

    Best Regards

    #2
    For in-browser sorting, we rely on the browser's native APIs for internationalization-sensitive sorting.

    While you could in theory add a sortNormalizer to implement your own sorting and try to match the server behavior, be aware that it's difficult to write one that would be fast enough for large datasets - at least if you need to support IE9 or IE8.

    Comment


      #3
      Thanks for the help.

      It seems to be possible to set my own sorting for properly dealing with umlauts, but like you said, its quite difficult to write one for large datasets.
      I think at this point we have to adopt the same sorting as the browser/smartclient, so that there are no different sortings.

      Performance of the different sorting for german umlauts
      tested here.

      Thanks for the fast response.

      Best

      Comment

      Working...
      X