Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Kanji with kanji dictionary entries and no term dictionary entries do not show up on the Yomichan search page #2211

Open
MarvNC opened this issue Aug 19, 2022 · 4 comments

Comments

@MarvNC
Copy link

MarvNC commented Aug 19, 2022

Description
Some kanji might only have an entry in a kanji dictionary and not in any term dictionaries, in which case they may not be shown in the Yomichan search page. For example, 幷 can be hovered normally using Yomichan but it does not show when searched in the search page.

Below, with KANJIDIC installed and no term dictionaries containing the kanji.

Hover:
chrome_Google_-httpswww google com-_Google_Chrome_2022-08-19_14-37-06

Search page:
chrome_幷_-Yomichan_Search-_Google_Chrome_2022-08-19_14-37-23

Browser version
Chrome Version 104.0.5112.102 (Official Build) (64-bit)

Yomichan version
Yomichan 22.6.6.0

Exported settings file

@MarvNC
Copy link
Author

MarvNC commented Aug 19, 2022

In additional, some kanji do not scan at all even with a valid kanji dictionary entry for it. For example many of the kanji in this file, which are all included in this dictionary. Maybe there is some logic limiting what counts as a kanji?

@toasted-nutbread
Copy link
Collaborator

By default, when you search on the search page, it does not search for kanji-only definitions. The URL will look something like this:
chrome-extension://.../search.html?query=幷 or
chrome-extension://.../search.html?query=幷&type=terms&wildcards=off
which has no results.

Results will come up if the URL is:
chrome-extension://.../search.html?query=幷&type=kanji
-------------------------------------------^type=kanji (note this part)

This is obviously sub-optimal in terms of actual user workflow, but this is the reason why this happens.

For your second comment, are you able to point out a specific kanji that has the issue? I am assuming that when you say "scan", you mean regular scanning outside of the search page. I am able to scan many of the kanji on that file without issue.

@MarvNC
Copy link
Author

MarvNC commented Aug 20, 2022

Ah, I didn't know about the search page query.

Yes, here are some examples: 𠈓 𠡍 𡉴 that do not scan even with an entry in an installed dictionary. You can see it is rendered with a different font, which makes me suspect it is out of some range. It's listed in JIS level 4 so it's probably Japanese, and other kanji in that level do scan correctly.

Every single kanji in that file is included in the dictionary that is based on it I linked above.

Code_●_kanji_bank_1 json_-_Visual_Studio_Code_2022-08-19_17-04-32

@toasted-nutbread
Copy link
Collaborator

I suspect this has something to do with UTF-16 surrogate pairs. That is, the kanji you posted are technically represented as two "characters" which are rendered as a single glyph, so this may be causing some issues.

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

No branches or pull requests

2 participants