Hi, > I think the test is taking a bare low-level Flash array and sorting it, > then taking an ArrayCollection and applying a sort to it, and the order in > both should match. Yep I got that but exactly why should they match?
One is using the internalCompare method in spark.collections.Sort which ends up using ObjectUtils.stringCompare which uses the Flash native function localeCompare. The other is doing an array sort using the collate method returned from flash.globilization.Collator("en_us). Normally I guess they should return the same results but I can't see that they would have to. The docs on localeCompare have this to say - not exactly inspiring. "While this method is intended to handle the comparison in a locale-specific way, the ActionScript 3.0 implementation does not produce a different result from other string comparisons such as the equality (==) or inequality (!=) operators" On linux the AC is being sorted in the same order, but the array isn't, there no error in getting the collator or sorting and the locale is correctly set to "en_US". Has to be a Flash player difference I guess. Thanks, Justin