Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Re: Re: Sorting utf-8

by dakkar (Hermit)
on Apr 24, 2003 at 11:58 UTC ( #252859=note: print w/ replies, xml ) Need Help??

in reply to Re: Re: Sorting utf-8
in thread Sorting utf-8

Looking at the docs (and guessing at the UTS#10), I'd say that the Unicode collation algorithm is locale independent: it is supposed to give a collation key for any Unicode string (the fact that they are encoded in utf-8 is immaterial, BTW)

So I'd just use Unicode::Collate->new()->sort(@list)

If you want to customize the results, then you'll have to understand the UTS#10, but otherwise it should "just work"

        dakkar - Mobilis in mobile

Most of my code is tested...

Perl is strongly typed, it just has very few types (Dan)

Comment on Re: Re: Re: Sorting utf-8
Download Code
Replies are listed 'Best First'.
Re: Re: Re: Re: Sorting utf-8
by Anonymous Monk on Apr 24, 2003 at 12:54 UTC
    Hmm, pretty cool if that's how it works - from looking at the constructor arguments I was wondering if you'd need a hash defining per-locale options, but maybe not.

    I would pay a LOT of money for a book that explained Unicode in a non-geeky manner :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://252859]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2015-11-25 21:43 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (691 votes), past polls