Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort_by function not work very well with hungarian letters #1732

Closed
og900aero opened this issue May 26, 2024 · 2 comments
Closed

Sort_by function not work very well with hungarian letters #1732

og900aero opened this issue May 26, 2024 · 2 comments

Comments

@og900aero
Copy link

og900aero commented May 26, 2024

Sort of accented characters does not yet work properly.

screenshot_1716747075

Here you can see that it doesn't handle accented characters properly because it actually sorts by the second letter.

The correct sequence is always the following regardless of what the second character contains

A....
Á....
...
E
É
...
I
Í
...
O
Ó
Ö
Ő
...
U
Ú
Ü
Ű
...

@joelim-work
Copy link
Collaborator

The problem is that ignoredia doesn't handle this requirement:

  • If ignoredia is disabled then the characters will be sorted by their Unicode code point (accented characters come after regular characters).
  • If ignoredia is enabled then accented characters will be translated to their corresponding regular characters before sorting. But then this means a and á are treated as equivalent and there is no way to enforce an ordering between them.

I don't know if there's a way to implement this using the Go standard library, if not then it might not be feasible to implement this.

@og900aero
Copy link
Author

The problem is that ignoredia doesn't handle this requirement:

  • If ignoredia is disabled then the characters will be sorted by their Unicode code point (accented characters come after regular characters).
  • If ignoredia is enabled then accented characters will be translated to their corresponding regular characters before sorting. But then this means a and á are treated as equivalent and there is no way to enforce an ordering between them.

I don't know if there's a way to implement this using the Go standard library, if not then it might not be feasible to implement this.

I disabled ignoredia, but doesnt good -> it became worse

screenshot_1716806555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants