Line operations currently use `strcmp()`, so sorting non-ASCII text gives nonsense (because it sorts by bites of UTF-8 sequences). It would be nice to have normal sorting that use `g_utf8_collate()` (or `g_utf8_collate_key()` for better performance) either by default (replacing `strcmp()`) or as separate operations.
I'll see if I can get `lineoperations` working with non-ASCII characters. Thanks for pointing this out.
Probably best to make it separate operations, `strcmp()` isn't nonsense, it sorts by Unicode code point value, which is useful in some cases, and adding sorting by some locale stuff is useful in others.
Also there is the problem of what locale it uses. Remember files are shared around the world by github and friends, and having things sort by whatever locale the particular person editing it lives in isn't usually very sensible.
And requiring a user to restart Geany in a different locale to get the sort that a particular file requires is not a very user friendly approach either.
@danpla: this enhancement has been implemented by @smostertdev now and will be included in the next release of geany-plugins.
Thanks!
Closed #819.
github-comments@lists.geany.org