-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Searching titles and artists with accents and diacritics doesn't work #10781
Comments
Commented by: ronso0 I can't reproduce on Linux with Mixxx 2.3.4 I tried both with the file name and title tag and could find it both with "Buscándote" and "Buscandote". So this is a macOS issue? |
Commented by: pcantare I have Mixxx 2.3.3. Not sure if in 2.3.4 it might have been fixed. As for MacOS, I'm pretty sure the file system uses NFD normalization format rather than NFC, so searching the file name might get wrong result: https://medium.com/@sthadewald/the-utf-8-hell-of-mac-osx-feef5ea42407 I find it strange anyway that searching the title in the mp3 tags gets different results in different OS's. The tags in my mp3s are normalized as NFC. |
Commented by: ronso0 related: file path issue with m3u on macOS |
Commented by: daschuer We use a likeCompareLatinLow() function that replaces all special characters with their Latin replacements before compare. It sounds like this is not working on your device. mixxx/src/util/db/dbconnection.cpp Line 386 in a5906c1
Did you use the official Mixxx build? |
Commented by: pcantare I use the official Mixxx build (2.3.3) and I also downloaded the source files and built it. This morning I was actually prying into that file. |
Commented by: pcantare Actually it looks like the function likeCompareLatinLow() is not called when the search is performed. I added a few couts in the funcion and nothing is printed. Anyway, I could see that makeLatinLow() is called instead, but I don't know from where. |
Commented by: daschuer I have confirmed here: I assume everything is working with 2.4 alpha. So I suggest to use that, after some brief tests. |
Commented by: pcantare Thank you very much. I have the source code of 2.3.3. Is there a way I can enable this behaviour in this version as well? |
Commented by: pcantare |
Commented by: pcantare Thank you. It works! |
Issue closed with status Fix Committed. |
Reported by: pcantare
Date: 2022-07-07T11:09:04Z
Status: Fix Committed
Importance: Medium
Launchpad Issue: lp1980944
Tags: library, macos
Mixxx version: 2.3.3
OS version: MacOS 12.4
I have a lot of files with accents and diacritics (Spanish songs) and this causes some problems when searching them (I don't have the same characters in my keyboard). What's really strange is that I can't even find a track copying and pasting the exact title it has in the mp3 tags.
A possible solution: each searchable field (title, artist, genre...) could be duplicated in the database with an ASCII only version, for example:
title: Buscándote
title_ascii: buscandote
The original field is used for display while the ASCII one is used for search.
To convert a string to its ASCII can be done normalizing the unicode characters to NFD (https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms) and then strip away all marks and diacritics. The same should be done to the string entered in the search field.
Example in Java: https://stackoverflow.com/questions/2397804/java-string-searching-ignoring-accents/2397830#⁠2397830
The text was updated successfully, but these errors were encountered: