Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: sorting Chinese characters

by punch_card_don (Curate)
on Feb 01, 2013 at 13:39 UTC ( #1016545=note: print w/ replies, xml ) Need Help??


in reply to sorting Chinese characters

If it were me, I think I'd step back from the problem a moment and ask myself if trying to synchronize two independent sorting mechanisms is really what I want. Sounds like a potential source of on-going headaches.

Would assigning a unique identifier that defines order on both systems work in the given situation?




Time flies like an arrow. Fruit flies like a banana.


Comment on Re: sorting Chinese characters
Re^2: sorting Chinese characters
by larryk (Friar) on Feb 02, 2013 at 04:00 UTC
    The key in the index is unique the Unicode standard is supposed to define the order. I was rather hoping I could depend on that, since it is supposed to be a standard.

    Looks like my options are:

    • I could use the ordinal value of the characters and do a numeric sort instead of a textual sort. That's what I was suggesting in point 2 above.
    • The only other option is to ditch my Perl index creation and rewrite it in C# so that the index creation and the index usage are both using exactly the same sorting library. Not sure I want to go there yet, though.
    Any other options?
       larryk                                          
    perl -le "s,,reverse killer,e,y,rifle,lycra,,print"
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (15)
As of 2015-07-06 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls