{"action":"created","issue":{"url":"https://api.github.com/repos/exaile/exaile/issues/261","repository_url":"https://api.github.com/repos/exaile/exaile","labels_url":"https://api.github.com/repos/exaile/exaile/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/exaile/exaile/issues/261/comments","events_url":"https://api.github.com/repos/exaile/exaile/issues/261/events","html_url":"https://github.com/exaile/exaile/pull/261","id":152805080,"number":261,"title":"This fixes exaile/exaile#176: Ignore diacritics for search","user":{"login":"tfree87","id":12287743,"avatar_url":"https://avatars.githubusercontent.com/u/12287743?v=3","gravatar_id":"","url":"https://api.github.com/users/tfree87","html_url":"https://github.com/tfree87","followers_url":"https://api.github.com/users/tfree87/followers","following_url":"https://api.github.com/users/tfree87/following{/other_user}","gists_url":"https://api.github.com/users/tfree87/gists{/gist_id}","starred_url":"https://api.github.com/users/tfree87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfree87/subscriptions","organizations_url":"https://api.github.com/users/tfree87/orgs","repos_url":"https://api.github.com/users/tfree87/repos","events_url":"https://api.github.com/users/tfree87/events{/privacy}","received_events_url":"https://api.github.com/users/tfree87/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/exaile/exaile/labels/Type:%20enhancement","name":"Type: enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/exaile/exaile/milestones/2","html_url":"https://github.com/exaile/exaile/milestones/Exaile%204.0","labels_url":"https://api.github.com/repos/exaile/exaile/milestones/2/labels","id":807360,"number":2,"title":"Exaile 4.0","description":"This release of Exaile will use GTK 3.x and GStreamer 1.x.","creator":{"login":"virtuald","id":567900,"avatar_url":"https://avatars.githubusercontent.com/u/567900?v=3","gravatar_id":"","url":"https://api.github.com/users/virtuald","html_url":"https://github.com/virtuald","followers_url":"https://api.github.com/users/virtuald/followers","following_url":"https://api.github.com/users/virtuald/following{/other_user}","gists_url":"https://api.github.com/users/virtuald/gists{/gist_id}","starred_url":"https://api.github.com/users/virtuald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtuald/subscriptions","organizations_url":"https://api.github.com/users/virtuald/orgs","repos_url":"https://api.github.com/users/virtuald/repos","events_url":"https://api.github.com/users/virtuald/events{/privacy}","received_events_url":"https://api.github.com/users/virtuald/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":25,"state":"open","created_at":"2014-09-29T20:23:06Z","updated_at":"2016-05-03T16:09:09Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-05-03T15:36:05Z","updated_at":"2016-05-03T21:51:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/exaile/exaile/pulls/261","html_url":"https://github.com/exaile/exaile/pull/261","diff_url":"https://github.com/exaile/exaile/pull/261.diff","patch_url":"https://github.com/exaile/exaile/pull/261.patch"},"body":"I have used the unidecode library to add the ability to ignore diacritics while searching. If the unidecode library is present, then typing in something like \"motley crue\" or \"mötley crüe\" will both match \"Mötley Crüe\". This was done by converting both the `search_string` and the tag values into ascii text when a search was conducted. If the user does not have the unidecode library, then the default behavior is restored where diacritics are not ignored during search. I have tested this on my system and it works for searching when unicode and non-unicode strings are utilized for searching tracks."},"comment":{"url":"https://api.github.com/repos/exaile/exaile/issues/comments/216675787","html_url":"https://github.com/exaile/exaile/pull/261#issuecomment-216675787","issue_url":"https://api.github.com/repos/exaile/exaile/issues/261","id":216675787,"user":{"login":"tfree87","id":12287743,"avatar_url":"https://avatars.githubusercontent.com/u/12287743?v=3","gravatar_id":"","url":"https://api.github.com/users/tfree87","html_url":"https://github.com/tfree87","followers_url":"https://api.github.com/users/tfree87/followers","following_url":"https://api.github.com/users/tfree87/following{/other_user}","gists_url":"https://api.github.com/users/tfree87/gists{/gist_id}","starred_url":"https://api.github.com/users/tfree87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfree87/subscriptions","organizations_url":"https://api.github.com/users/tfree87/orgs","repos_url":"https://api.github.com/users/tfree87/repos","events_url":"https://api.github.com/users/tfree87/events{/privacy}","received_events_url":"https://api.github.com/users/tfree87/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T21:51:28Z","updated_at":"2016-05-03T21:51:28Z","body":"If found this solution from j4mie/normalise.py. This solution used the unicodedata.normalize function from the Python standard library. Under my tests this worked when using a unicode string to search and when using a. This solution performs the same function as before where unicode search strings are converted to ascii if they are unicode and all content from music tags are converted to ascii as well when compared."}}