V4RB*NEW* Properties to control Locale, Encoding, Sorting

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Aug 12 10:07:26 CDT 2004


On 8/12/04 12:14 AM, "jda" <jda at his.com> wrote:

>> 
>>   /**
>>   * Base letter represents a primary difference. Set comparison level to
>>   * PRIMARY to ignore secondary and tertiary differences.<br>
>>   * Use this to set the strength of a Collator object.<br>
>>   * Example of primary difference, "abc" &lt; "abd"
>>   *
>>   * Diacritical differences on the same base letter represent a secondary
>>   * difference. Set comparison level to SECONDARY to ignore tertiary
>>   * differences. Use this to set the strength of a Collator object.<br>
>>   * Example of secondary difference, "”" >> "a".
>>   *
>>   * Uppercase and lowercase versions of the same character represents a
>>   * tertiary difference.  Set comparison level to TERTIARY to include all
>>   * comparison differences. Use this to set the strength of a Collator
>>   * object.<br>
>>   * Example of tertiary difference, "abc" "ABC".
>>   *
>>   * Two characters are considered "identical" when they have the
>>   *  same unicode
>>   * spellings.<br>
>>   * For example, "”" == "”".
>>   *
> 
> So if I want to ignore case but I want to
> consider accents (a <> ä) I would set the
> strength to secondary?
> 
> And if I wanted to ignore accents, too, I would set it to...tertiary?

No, here reverse logic.
I also have catch not from start.

    tertiary -- this is like in Valentina 1.x.
                aaa <> AAA
                aaa <> åaa

                upper(aaa) => AAA
                upper(åaa) => ÅAA


    SECONDARY -- ignores difference between Diacritical chars
                 i.e. Secondary difference of chars.

                aaa <> AAA
                aaa == åaa

                upper(aaa) => AAA
                upper(åaa) => AAA

    PRIMARY -- ignores difference between case of chars
                 i.e. Ignore primary difference of chars.

                aaa == AAA
                aaa == åaa

                upper(aaa) => AAA
                upper(åaa) => AAA

    


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list