Re: [HELP] Strange sort order. Why?
Vladimir Weinstein <[email protected]> Mon, 21 Feb 2005 14:11:04 -0800
| Newsgroups | gmane.comp.lib.icu.general |
|---|---|
| Message-ID | <[email protected]> |
Yes, if you make a tailoring that establishes a-accent as a primary difference from a. There are languages where this is the case (Croatian/Serbian(Latin), Slovak etc.). But for English, accented a is just an a with an accent. so your tailoring might look something like: &a < á Hope this helps. Regards, v. Ruslan Zasukhin wrote: > On 2/21/05 11:29 PM, "Vladimir Weinstein" <[email protected]> wrote: > > Hi Vladimir, > > Then I ask in other way. Can I get THIS ORDER using ICU ? > > Sadler Saunder Sánchez (1) > > I need this order, because I use this sorted list for range search. > I need find all strings that START WITH 'Sa'. > > Having order > > Sadler Sánchez Saunder (2) > > I get incorrect results. Because I find left point of range "Sadler" > Then I find right point of range "Saunder"... > And into result I get all 3 words including "Sánchez" > > But users say: > Hey, I have choose SECONDARY option. > I do not want to see accents in the result! > > So how to get order (1) ? > > >>Hi, >> >>this is expected order. The difference between a and accented a is by default >>a secondary difference - meaning it is examined only if the strings are >>equivalent on the primary level. Since there is a primary difference between >>'u' and 'n' it takes precedence and thus establishes the sort order. >> >>Hope this helps. >> >>Regards, >>v. >> >>Ruslan Zasukhin wrote: >> >>>Hi All, >>> >>>If to go on this online demo >>> >>>http://www-950.ibm.com/software/globalization/icu/demo/locales/en/?_=en_US&d >>>_=en&x=col >>> >>>And use these 3 words >>> >>> Sadler >>> Saunder >>> Sánchez >>> >>>The result of sorting will be >>> >>> Sadler >>> Sánchez >>> Saunder >>> >>>This result of sorting we have for any set of parameters, btw! >>> >>> user want to use in fact SECONDARY(=1) value as collation strength. >>> >>> >>>------------------------------------------------------------ >>>QUESTION IS: >>> >>> it looks to me (and to our customers) that this is WRONG order. >>> for example Excel and any other soft we have try show order >>> >>> Sadler >>> Saunder >>> Sánchez >>> >>> >>>Why ICU produce this wrong order ???? >>> >>>Or where we do mistake ? >>> >>> > > -- Vladimir Weinstein, IBM GCoC-Unicode/ICU San Jose, CA [email protected]