Sort and localization

Hi to all
I’m trying to solve projecteuler problem 022
(#22 Names Scores - Project Euler) but with no
success. I suspect it may depend on localization of ruby sort (???). So
my question is: may ruby sort change due to the localization of the
machine it is running on?

On Wed, May 6, 2009 at 4:50 PM, Giampiero Z. [email protected] wrote:

Hi to all
I’m trying to solve projecteuler problem 022
(#22 Names Scores - Project Euler) but with no
success. I suspect it may depend on localization of ruby sort (???). So
my question is: may ruby sort change due to the localization of the
machine it is running on?

Sort is done by ASCII sort order on Ruby 1.8. Not sure on Ruby 1.9,
but my guess is that it does not assume anything about ‘alphabetical
order’, but uses character codes instead. (Causing the same problem)

-greg

Hi Gregory
I will try to build a custom sort on array string
thanks for your kind reply
Giampiero