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

Can't search non-english language in iOS #458

Closed
Alimjoo opened this issue Sep 21, 2022 · 6 comments
Closed

Can't search non-english language in iOS #458

Alimjoo opened this issue Sep 21, 2022 · 6 comments
Assignees
Milestone

Comments

@Alimjoo
Copy link

Alimjoo commented Sep 21, 2022

cant search non-english languages in iOS version. For example, When i search "Turán theorem" in desktop version, it will show me the results, but in iOS version, it shows nothing.

@kelson42
Copy link
Contributor

kelson42 commented Nov 9, 2022

@Alimjoo What was your exact content on which you run this search?

@kelson42 kelson42 self-assigned this Nov 9, 2022
@kelson42 kelson42 added this to the 3.0.0 milestone Nov 9, 2022
@kelson42 kelson42 added the iOS label Nov 9, 2022
@Alimjoo
Copy link
Author

Alimjoo commented Nov 10, 2022

@Alimjoo What was your exact content on which you run this search?

The content I'am searching for is Turán's theorem. When I type Tur in search bar, it will show some results, but when I type Turá, the result just show nothing. And I also type á alone in the search bar, it show nothing also.

But macOS version works fine.

@kelson42
Copy link
Contributor

@Alimjoo question is not what you search, but in which book/content/zim?

@Alimjoo
Copy link
Author

Alimjoo commented Nov 10, 2022

English version of the Wikipedia and wikiquote.

@kelson42 kelson42 modified the milestones: 3.0.0, 3.1.0 May 28, 2023
@HiroyasuNishiyama
Copy link

HiroyasuNishiyama commented Aug 22, 2023

Hi.
Similar problem occurs when searching Japanese Wikipedia.

My guess is that this is due to internal character encoding.
iOS and macOS use NFD (Normalization Form Canonical Decomposition) for character encoding. On the other hand, it seems that NFC (Normalization Form Canonical Composition) is used in the content.
Since NFD represents some characters, such as umlauts, as a composite of two characters, it is assumed that the search fails.
(See here for details on NFC and NFD)

I think that it can be solved by converting the search target string from NFD to NFC with precomposedStringWithCanonicalMapping in swift code if the quess is correct.

@kelson42
Copy link
Contributor

kelson42 commented Nov 25, 2023

@Alimjoo The bug you have reported should be fixed in version 3.2. I have tested with wiktionary in German on iPad. Please reopen ticket if not fixed on your side.

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

No branches or pull requests

4 participants