Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2014-08-31 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls