Incorrect Sort?

Karl Grob kgrob at mus.ch
Sat Jun 16 04:34:32 CDT 2007


I do have a DB with only one Table ("Register") . The DB has the  
following localization:

   myDB.StorageEncoding = "UTF-8"
   myDB.IOEncoding = "UTF-8"
   myDB.DateFormat = EVDateFormat.kDMY
   myDB.DateSep = myDateSep
   myDB.TimeSep = myTimeSep
   myDB.CenturyBound = 20
   myDB.LocaleName = "German"
   myDB.CollationAttribute(EVColAttribute.kAlternateHandling) =  
EVColAttributeValue.kON
   myDB.CollationAttribute(EVColAttribute.kCaseFirst) =  
EVColAttributeValue.kOFF
   myDB.CollationAttribute(EVColAttribute.kCaseLevel) =  
EVColAttributeValue.kOn
   myDB.CollationAttribute(EVColAttribute.kFrenchCollation) =  
EVColAttributeValue.kON
   myDB.CollationAttribute(EVColAttribute.kNormalizationMode) =  
EVColAttributeValue.kON
   myDB.CollationAttribute(EVColAttribute.kHiraganaQuaternaryMode) =  
EVColAttributeValue.kOFF
   myDB.CollationAttribute(EVColAttribute.kStrength) =  
EVColAttributeValue.kTertiary

BTW: In VStudio FrenchCollation is OFF, the rest is as shown  
(Changing the Parameters in VStudio results in a immediate Crash.  
Sometimes the parameter is then changed after restart of VStudio.)

Now I am trying to sort Titles of Poems, and the sort is done, but  
gives at some places incorrect results. The field is VString  
(Indexed) and the following is just an example:

1859
2
3
1859	
50jährigen Jubiläum der Hochschule Zürich
A Dissonanz
Abendlied
Abend war's ich stand am Ufer
Abendgang Abendlied
Abendlied
Abend
Abendlied an die Natur
Abendlied Abendgang
Abendregen
Abendregen
Abendregen
Abend auf Golgatha
Abendlied
Abendlied an die Natur

This is not a result of my RB-Code. VStudio gives the same results. I  
am sorting with a physically copied field containing only  
alphanumeric signs. Using a method-field for the same purpose and the  
same replacements results in a more incorrect sort. The strange thing  
is, that in both cases the sorting takes place, but is locally  
incorrect, and I am not able to find a system behind the errors.

Reindexing is successfull and the diagnose of the DB results in  
"Problems found!".
==========> Field: SortEintrag , type String
==========> IndexFile
PAGE (0, 0) Inventory pages OK.
Index Inventory pages OK.
PAGE (3, 2) At least one value counter is wrong. Values have wrong  
order.
Problems found!  ( IndexFile )
Problems found!  ( Field: SortEintrag , type String )
Problems found!  ( Table: Register )

All indexed string-Fields have this problem.
Cloning the DB results in a change of UTF-8 to UTF-16 and the whole  
cloned DB is in Chinese. (I am using for some CHARs the private area  
of a OTF-Font, but all those CHARs are replaced in the texts of the  
sorted field.)

BTW: This is not a problem of Version 3.0, it is older.

What am I doing wrong?

Karl Grob

G5-Mac OS 10.4.9









More information about the Valentina mailing list