Gossamer Forum
Home : Products : Links 2.0 : Customization :

foreign alphabetical sort?

Quote Reply
foreign alphabetical sort?
I have a site using the foreign language mod (which works great!) but I need to change the link ordering to be based on a foreign alphabet. The current build_sorthit function uses the default alphbetical order (using cmp).

Does anyone have any pointers for how to do this efficiently?

Thanks for your time!
Ashley

Quote Reply
Re: foreign alphabetical sort? In reply to
You will probably have to write your own sort routine. I don't think there is anyway you can use Perl to sort for a different alphabet than the one it uses by default. Most "foreign" (non-English alphabet) characters are represented by high-ASCII codes and not actual letters. They are not in order by any particular language. Perl just knows the ASCII collating sequence.

Perhaps if you posted this in the Perl and CGI Forum, you might get some help.

I wish you luck.

- Bobsie
bobsie@orphanage.com
http://goodstuff.orphanage.com/
Quote Reply
Re: foreign alphabetical sort? In reply to
Thanks Bobsie!

I did end up writing my own sort (you're right it was really more of a perl thing than a links thing -- I just thought someone might have encountered it before). I'd be happy to share the functions if anyone would like to see them.

Thanks,
Ashley

Quote Reply
Re: foreign alphabetical sort? In reply to
It would be great if you would write it up as a mod or FAQ for the resource center!