Sunday, December 6, 2020

Re: the :sort command does not appear to give expected result

On Sun, Dec 06, 2020 at 04:37:52AM EST, BPJ wrote:
> Den tis 27 okt. 2020 23:56Chris Jones <cjns1989@gmail.com> skrev:
>
> >
> > If I use the sort command provided on linux by the GNU coreutils package
> > so as to sort this file at the terminal
> >
>
> I use an external Perl script which uses one of several sort orders defined
> in Perl modules with [Unicode::Collate::Locale][] or [Sort::ArbBiLex][]. It
> doesn't have the feature to sort on what is or isn't matched by a regex but
> I guess that could be added. (Darn, I think I just got an itch! :-)
>
> [Unicode::Collate::Locale]:
> https://metacpan.org/pod/Unicode::Collate::Locale
>
> [Sort::ArbBiLex]: https://metacpan.org/pod/Sort::ArbBiLex

One of the python Stack Exchange issues I found that covered this issue
actually suggested using this Perl library! I was indeed quite
surprised python didn't do it right out of the box so that I had to use
what appears to be the pyICU bindings to ICU IBM-maintained C++ libary.

Obviously since this is in an ebook/epub context and collating order
across a variety of languages is a rather intricate issue that normally
addressed by people who know what they are doing... all I wanted to know
was grabbin the language hard-coded in the book's metadata and pass it
to a function that takes care of sorting the dictionary created by
scanning the markdown source and picking up the LaTeX index tags. If
I was crazy enough to think of maintaining my own locale stuff and have
it do the right thing for Hungarian or Portuguese not to mention Greek
and various flavour of Cyrillic... I wouldn't know where to start.

Thanks,

CJ

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201206220319.GF5952%40turki.local.

No comments: