cops icon indicating copy to clipboard operation
cops copied to clipboard

Bug: Author list accented letters are not grouped with non-accented

Open gczobel opened this issue 7 years ago • 7 comments

Hi, Some authors with an spanish last name have accented characters in the first letter. Example: "Úbeda, Francisco López de" Not sure about other languages but in Spanish accented letters must be grouped with non accented ones. So... á = a, é = e, í = i, ó = o and ú = u

In the authors list, I see different entries for authors with accented and non-accented first letter.

gczobel avatar Oct 20 '16 11:10 gczobel

It's a bug indeed but not one that can be easily fixed.

You can check https://github.com/seblucas/cops/issues/262#issuecomment-211400043 to see it's a long time problem. It would need specific extension to sqlite which are hard to handle with PHP.

In France, we also have diacritics (accentuated characters and some harder cases) and I have the same sorting problem. The only solution I have for now is to use https://github.com/seblucas/cops/blob/master/config_default.php#L291-L297. You won't see any accentuated anymore in your list but the list will be correctly sorted. But this parameter is really slow.

seblucas avatar Oct 21 '16 12:10 seblucas

Perhaps Collator('bg_BG') might be a potential general solution, still not perfect though.

Ecksters avatar Oct 21 '16 14:10 Ecksters

That's true that I could sort the array in PHP (for now every sort was done by the database)

seblucas avatar Oct 21 '16 15:10 seblucas

SQLite3 is supposed to support UTF8 encoding, and supposedly should sort it correctly, are we using that?

Ecksters avatar Oct 21 '16 20:10 Ecksters

I have suggestion - calibre has "sort_name" field in the authors table. May be we just can store non-accented letters in that field an use it to the sorting?

Rurik19 avatar Oct 23 '16 16:10 Rurik19

@Ecksters

Thanks for the idea with Collator, it seems to work with French, I'll check the performance hit and will fix it soon

seblucas avatar Oct 24 '16 12:10 seblucas

Something new about this?

gczobel avatar Oct 24 '17 07:10 gczobel