in reply to Re^4: Sorting Vietnamese text
in thread Sorting Vietnamese text
Okay, I also get that output when using the entire lines as written. However, cutting those lines short at or before the colon ':' gives this.sorted ỷ : (1) to be fat (said of a pig); (2) to depend on ỳ ạch : to toil, labor with difficulty ỷ eo : reproach someone with something yêu nhau : to love each other, be in love yêu quí : precious, valuable ỳ : inertia, state of inactivity, stay out, inert, sluggish ỷ lại : to depend, rely on others ỷ thế : count on one’s power, one’s position, one’s influence
sorted ỳ : ỷ : ỳ ạch : ỷ eo : yêu nhau : yêu quí : ỷ lại : ỷ thế :What seems to be going on is that due to the complicated rules for ordering in Vietnamese based on syllables, having the English translation after the Vietnamese is messing up the sorting.
I'd suggest trying to separate them into a hash if possible (split on the colon, maybe) so the sort can be based only on the Vietnamese.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Sorting Vietnamese text
by pdenisowski (Acolyte) on Dec 23, 2013 at 15:03 UTC | |
by Atacama (Sexton) on Dec 25, 2013 at 04:28 UTC |
In Section
Seekers of Perl Wisdom