Sorting and Grouping Data : Sorting data : Setting the sort strength
 
Setting the sort strength
BIRT supports locale-sensitive sorting and provides six strengths, or levels, of string comparisons, described in Table 9‑1. The strength specifies what type of difference needs to exist between two letters or strings for them to be considered different.
Table 9‑1 Sort strengths
Strength
Description
ASCII
Collates by the ASCII values of the letters. Differences in case and accents are significant. For example:
A < B < a < à
Primary
Different base letters are considered a primary difference. Use Primary to ignore case and accents. For example:
a = A = à < b < c
Secondary
Different accented forms of the same base letter are considered a secondary difference. Use Secondary to ignore case. For example:
ab = Ab < àb < ac
Tertiary
Case differences and different accented forms of the same base letter are considered Tertiary differences. For example:
ao < Ao < aò
Quaternary
When punctuation is ignored at the previous strengths, use Quaternary to differentiate strings with and without punctuation. For example:
ab < a-b < aB
Identical
When all other strengths are equal, the Identical strength is a tie-breaker. The Unicode code point values of the NFD form of each string are compared. Use this strength sparingly as it decreases performance and is rarely needed.
The effect of applying the different strengths depends on the locale. Each language has its own rules for determining the proper collation order. For example, in some languages, such as Danish, certain accented letters are considered to be separate base characters. In most languages, however, an accented letter has a secondary difference from the unaccented version of that letter. The following example shows the difference in sorting when the collation strength is secondary, but the locales are different:
Danish         German
a              A
A              a
â              â
Ä              B
B              Ä