Sorting lines with diacriticals

Jeanne A. E. DeVoto jeanne at
Mon Jun 3 17:50:01 EDT 2002

At 2:19 AM -0700 6/3/2002, Manuel Companys wrote:
>What would be nice is to have a parameter such as "sortSystem"  : ASCII,
>languageA .... languageN, custom.  "Custom" would allow defining a sorting
>system for special purposes.

You can sort by the returned value of a function. For example:

  on mouseUp
    sort lines of field "Text" by useCedillas(each)
  end mouseUp

  function useCedillas theLine
    replace "ç" with "c" in theLine -- c-cedilla, option-c
    replace "Ç" with "C" in theLine -- C-cedilla, option-shift-c
    return theLine
  end useCedillas

This simple example makes c-with-cedilla equal to c in the sort. You can
see how this can be extended to create different sort systems.

Jeanne A. E. DeVoto ~ jeanne at
Runtime Revolution Limited - The Solution for Software Development

More information about the Use-livecode mailing list