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

Cyrillic L (Л) replaced by 'n' when searching #4025

Closed
danil-tolkachev opened this issue Nov 2, 2020 · 11 comments · Fixed by #4152
Closed

Cyrillic L (Л) replaced by 'n' when searching #4025

danil-tolkachev opened this issue Nov 2, 2020 · 11 comments · Fixed by #4152
Labels
bug It's a bug

Comments

@danil-tolkachev
Copy link
Contributor

Environment

Joplin version: 1.3.11
Platform: Linux
OS specifics: Linux Mint 19.3 (based on Ubuntu 18.04)

Steps to reproduce

  1. Create note titled with cirillic symbol "Л"
    image

  2. Press Ctrl+P and type some text from title

  3. In search results you can see that "Л" was replaced with "n"
    image

@danil-tolkachev danil-tolkachev added the bug It's a bug label Nov 2, 2020
@danil-tolkachev danil-tolkachev changed the title Cirillic L (Л) replaced by 'n' when searching Cyrillic L (Л) replaced by 'n' when searching Nov 2, 2020
@danil-tolkachev
Copy link
Contributor Author

The same bug is on Windows 10 too. Can anybody else reproduced this? I checked another symbols but all symbols except 'л' are rendered correctly.

@roman-r-m
Copy link
Collaborator

Yep, can reproduce it, though it does not highlight "n" for me but still finds notes containing "n".

@roman-r-m
Copy link
Collaborator

roman-r-m commented Nov 24, 2020

Tracked down to these lines in node-diacritics (л is \u043B)
https://github.com/andrewrk/node-diacritics/blob/a58b04da01ce92f1635918fef563e3286ea5a32e/index.js#L233-L234

No idea why is it changing "л" to "n", does not make any sense to me, it has nothing to do with diacritics

@roman-r-m
Copy link
Collaborator

Ah! There's even an issue for this: andrewrk/node-diacritics#32
That repo seems abandoned though.

@danil-tolkachev
Copy link
Contributor Author

@roman-r-m Thanks for the investigation.

@danil-tolkachev
Copy link
Contributor Author

I don't know javascript, but i've found that Joplin contains its own implementation of removeDiacritics. May be it's possible not to use andrewrk/node-diacritics? The probable place is here.

@roman-r-m
Copy link
Collaborator

I don't know javascript, but i've found that Joplin contains its own implementation of removeDiacritics. May be it's possible not to use andrewrk/node-diacritics? The probable place is here.

Good catch, thanks. I've not noticed there was already an implementation of this function in lib

@danil-tolkachev
Copy link
Contributor Author

I've tested 1.5.7 version, and it works well now for newly created notes.

But there is steel 'n' for old notes instead of 'Л'. Anybody knows how to update search index?

@roman-r-m
Copy link
Collaborator

The only thing comes to mind is export, delete your DB and start from scratch

@danil-tolkachev
Copy link
Contributor Author

@laurent22 Could you please make it clear, is there another way to update search index except of re-importing all DB?

@laurent22
Copy link
Owner

If there's only a few notes, you can also manually modify each of them (like add a space) for example, which will retrigger indexing for those notes.

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

Successfully merging a pull request may close this issue.

3 participants