change in vw7.7 string sorting?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

change in vw7.7 string sorting?

MarkPetersen
I searched a little and couldn't find anything on how strings are now sorted in vw7.7.  I'm seeing a difference in behavior from vw7.4 to vw7.7  
In vw7.4, sorting results in
SortedCollection ('00P_BEOLCAP11' '00P_BEOLCAP1_p101p2002' '00P_BEOLCAP1_p151p1753' '00P_BEOLCAP1_p176p2004' '00P_BEOLCAP1_p1p1005' '00P_BEOLCAP1_p1p256' '00P_BEOLCAP1_p26p507' '00P_BEOLCAP1_p51p758' '00P_BEOLCAP1_p76p1009')

In vw7.7, sorting results in
SortedCollection ('00P_BEOLCAP1_p101p2002' '00P_BEOLCAP1_p151p1753' '00P_BEOLCAP1_p176p2004' '00P_BEOLCAP1_p1p1005' '00P_BEOLCAP1_p1p256' '00P_BEOLCAP1_p26p507' '00P_BEOLCAP1_p51p758' '00P_BEOLCAP1_p76p1009' '00P_BEOLCAP11')

So '00P_BEOLCAP11' is at the end instead of at the beginning where I would expect it.  The difference seems to be how $_ compares to $1.  In both vw7.4 and vw7.7 $1<$_ evaluates to true, so I'm confused as to why '00P_BEOLCAP11' would be at the end.

Locale is set to #C.

Thanks for any insight.

Mark Petersen
Reply | Threaded
Open this post in threaded view
|

Re: change in vw7.7 string sorting?

Dennis smith-4
This SHOULD have made it into the release notes, but did not.

You can return to the old collation by
     StringCollationPolicy  collationAlgorithm:  #Fast



On 3/12/2010 3:32 PM, MarkPetersen wrote:

> I searched a little and couldn't find anything on how strings are now sorted
> in vw7.7.  I'm seeing a difference in behavior from vw7.4 to vw7.7
> In vw7.4, sorting results in
> SortedCollection ('00P_BEOLCAP11' '00P_BEOLCAP1_p101p2002'
> '00P_BEOLCAP1_p151p1753' '00P_BEOLCAP1_p176p2004' '00P_BEOLCAP1_p1p1005'
> '00P_BEOLCAP1_p1p256' '00P_BEOLCAP1_p26p507' '00P_BEOLCAP1_p51p758'
> '00P_BEOLCAP1_p76p1009')
>
> In vw7.7, sorting results in
> SortedCollection ('00P_BEOLCAP1_p101p2002' '00P_BEOLCAP1_p151p1753'
> '00P_BEOLCAP1_p176p2004' '00P_BEOLCAP1_p1p1005' '00P_BEOLCAP1_p1p256'
> '00P_BEOLCAP1_p26p507' '00P_BEOLCAP1_p51p758' '00P_BEOLCAP1_p76p1009'
> '00P_BEOLCAP11')
>
> So '00P_BEOLCAP11' is at the end instead of at the beginning where I would
> expect it.  The difference seems to be how $_ compares to $1.  In both vw7.4
> and vw7.7 $1<$_ evaluates to true, so I'm confused as to why '00P_BEOLCAP11'
> would be at the end.
>
> Locale is set to #C.
>
> Thanks for any insight.
>
> Mark Petersen
>    

--
Dennis Smith                         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              sip:[hidden email]
Canada         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: change in vw7.7 string sorting?

MarkPetersen
Thanks for the information, Dennis.  That works.

Mark Petersen
Reply | Threaded
Open this post in threaded view
|

Re: change in vw7.7 string sorting?

Alan Knight-2
Yes, note that this change was part of the change to using Unicode collation in general. The #Fast collation, while definitely faster, and more consistent with the older one, will be less correct on languages other than English. There are also unicode variations, which I know deal with punctuation differently.

At 08:58 AM 2010-03-15, MarkPetersen wrote:

Thanks for the information, Dennis.  That works.

Mark Petersen
--
View this message in context: http://n4.nabble.com/change-in-vw7-7-string-sorting-tp1591101p1593324.html
Sent from the VisualWorks mailing list archive at Nabble.com.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

--
Alan Knight [|], Engineering Manager, Cincom Smalltalk

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc