Automattic / Automattic/simplenote-ios

Searching for Chinese characters doesn't consistently show results within note

Open
#740 0 comments 0 reactions 0 assignees View on GitHub
[feature] search bug i18n
Dominant language
Swift
Stars
2.1k
Forks
297
Avg merge
13h 25m
Merged PRs (30d)
6

Description

### Expected
Searching for Chinese characters should show results within note.

### Observed
Searching for Chinese text correctly filters the note list to the matching note, but when you tap on the note itself, it says "0 results" at the bottom.

User reported in 2890599-zen and also said that searching in English is always fine, but that searching Chinese works most of the time, sometimes fails.

### Reproduced
1. Paste the following text as a new note:

>《本經》:「下瘀血,血閉寒熱,破痞痕積聚,留飲宿食,蕩滌腸胃,推新致新,通利水報,調中化食,安和五臟。」《本草綱目》:「下痢赤白,裡急腹痛,小便淋瀝,實熱燥結,潮熱證語,黃疸,諸火痛。」《藥品化義》:「大黃氣味重濁,直降下行,走而不守,有斬關奪門之力,故號將軍。專攻心腹脹滿,胸胃蓄熱,積聚疫實便結瘀血,女人經閉。」苦,寒。寒涼香氣,阴沈而趨下,可瀉瘀

2. Search for the string "大黃"

3. Note that the note list shows filtered results:

![IMG_08B06334F460-1](https://user-images.githubusercontent.com/52152/80166686-63d7df80-8593-11ea-8922-a79e684576cf.jpeg)

4. Tap into the note and observe that it shows "0 results":

![IMG_8639BFEBD075-1](https://user-images.githubusercontent.com/52152/80166706-6df9de00-8593-11ea-9bb9-2dabd842f650.jpeg)

5. Other combinations of strings do seem to return results, e.g.:

![IMG_B88CAED5B2F2-1](https://user-images.githubusercontent.com/52152/80167104-67b83180-8594-11ea-871d-a354c3a07557.jpeg)

Reproduced on Simplenote 4.18.0.1 beta, iOS 13.3.1

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Reproduce on Simplenote 4.18.0.1 beta for iOS 13.3.1 using the supplied note and the Chinese search string, then compare the note-list filtering with the in-note result count; done means the matching text appears within the opened note.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile-dev, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.