osmcha-frontend
osmcha-frontend copied to clipboard
Location search doesn't work with Chinese input method
I'm submitting a bug report
Brief Description
I am trying to search for a location name in Chinese but the website failed to recognize input
How do we replicate the issue ?
- Use the browser environment and input method specified below
- Go to the "Location" input box in "filter" part of the page
- Type Chinese names of location, like "新疆"
What is the expected behaviour ?
The website should be able to recognize the Chinese input and search location that contain the matching Chinese name
What is the current behaviour, (attach relevant screenshots) ?
It still tell me "Type to search" even after I finished typing, as if I didn't type anything

When does this occur ?
Always
Please tell us about your environment:
Windows 10 Vivaldi 3.3.2022.47 Browser addon: Google Input Method Google Input Method setting: Cantonese Phonetic Input mode: Chinese characters, Half-width, Chinese punctuation
Other Information / context:
I think the problem here is that we enable the search only when we type 3 characters. We should check the locale of the browser and enable it with any number of chars when the locale is Japanese, Chinese, Korean and some other Asiatic languages.
I would like to work on this.
With that said, this requirement of at least 3 characters is not a problem only in certain Asian locales. There are also multiple cities, municipalities etc. where the name is only 2 Latin-script letters. Examples:
- https://en.wikipedia.org/wiki/Bo,_Sierra_Leone
- https://en.wikipedia.org/wiki/Ii,_Finland
- and more at https://en.wikipedia.org/wiki/List_of_short_place_names
I would start with:
- Changing minimum character requirement from 3 to 2.
- Disabling minimum character requirement if input text contains any characters from a specified set of scripts according to Unicode classification. These would include at least Han, Hangul, Hiragana and Katakana but probably also some others are needed.
Browser locale and input method can correlate with the used script but as far as I understand these are separate concepts. You can type place names in Chinese while using the browser in a different language and still want those Chinese search results.
If we didn't require any number of characters, the logic would be simpler and allow searching also certain place names where the whole name is just 1 Latin-script letter. Examples can be seen in the above mentioned list of short place names. Could we somehow make it possible to remove this limit completely? Would this perhaps require limiting the number of results when the number of characters is small?