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

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Aug 12 00:04:00 CDT 2004


Hi All,

Right now I work on implementation of the next new methods

Class Vdatabase, Vtable and Vstring/VarChar/VText
Will get next 3 properties

    Locale  as String
    Encoding as String
    CollactionStrnegth as Integer


The game start in database.

* when we create database it get on default system settings,
    Or we can set what we want.
* when we create table, it inherit settings from db.
* the same for field, it inherit it from table.


So if you want to use the same settings for the whole db, you simply specify
them for db. And do not care for fields.

You can have some table(s)/field(s) with other settings.
Settings of course are stored in the system tables.


Example:

    Locale:  "en_US", "en_GB",


    Encoding: "UTF-16", "UTF8", "Western MacOS Roman", Latin-1,
                Cyrillic(Windows), Windows-1251, ..


    Strength:

  /**
  * 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, "”" == "”".
  *
  * UCollationStrength is also used to determine the strength of sort keys
  * generated from Collator objects.
  * @stable ICU 2.0
  */
  enum ECollationStrength
  {
    PRIMARY    = 0,
    SECONDARY  = 1,
    TERTIARY   = 2,
    QUATERNARY = 3,
    IDENTICAL  = 15
  };



-- 
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