01-13-2024, 09:38 AM | #1 |
Connoisseur
Posts: 58
Karma: 2112464
Join Date: Aug 2014
Device: Kobo Glo HD
|
Japanese Furigana and dictionnary search.
Hello all !
I got some book on my kobo (世にも奇妙な商品カタログ) that contains furigana above the kanjis, i.e. small characters indicating how the kanji is supposed to be read. In the HTML, it looks like this: Code:
<ruby><span>行方</span><rt>ゆくえ</rt><span>不</span><rt>ふ</rt><span>明</span><rt>めい</rt></ruby> Problem is, if I try to do a dictionary search search, the kobo will look for the word 行方ゆくえ不ふ明めい, which doesn't exist. I could just edit the book and remove all the <rt> to make the words searchable, but isn't there another way ? Could I make the <rt> non-selectable or something ? EDIT: I was able to write a script that just groups all the <rt> at the end of the <ruby>. It works in most cases, but it still means I can't use the dictionary on text bits that contain several <ruby> :/ Last edited by Simboubou; 01-13-2024 at 01:37 PM. |
01-14-2024, 08:43 AM | #2 |
Absentminded Reader
Posts: 1,286
Karma: 6916983
Join Date: Apr 2017
Device: Kobo Mini, Libra Colour & Elipsa; Kindle Paperwhite 3 & 4; iOS apps
|
Is your language set to Japanese in the Settings on your Kobo, but your country setting on in Payment Information on kobo.com set to an English speaking country?
A few years ago when I was experimenting with using Japanese on my Kobo, I found that having the Kobo Store in English and my Kobo in Japanese created buggy inconsistencies that went away when the Kobo Store was set to Japan. It’s an interesting bug that you found. I can’t imagine that furigana causes such problems for native Japanese speakers. I need to know more about how you’ve set your Kobo up. |
Advert | |
|
01-14-2024, 01:42 PM | #3 |
Connoisseur
Posts: 58
Karma: 2112464
Join Date: Aug 2014
Device: Kobo Glo HD
|
My kobo is set to japanese, by my account is my French account. I do have a Japanese kobo account, too. I'm using a kepub file.
I edited the book to transform this: Code:
<ruby><span>行方</span><rt>ゆくえ</rt><span>不</span><rt>ふ</rt><span>明</span><rt>めい</rt></ruby> Code:
<ruby><span>行方</span><span>不</span><span>明</span><rt>ゆくえふめい</rt></ruby> I also inserted css to make the content of <rt> unselectable. Now, selecting the text in the kobo only highlights the kanjis, but the search itself searches for 行方不明ゆくえふめい, and returns results for 行方不明, so it kinda worksfor words that have a single block of furigana (which is not always the case, especially some compound words like 思い出す for instance. Selecting that word would look for 思おもい出だす, which doesn't exist). It appears the reader is actually taking all the html, remove all the tags, and look for whatever remains. EDIT : wait, if drop the original book (with my furigana changes), not the "converted to kepub" book on my kobo, it works ! But it does display the "pages left in chapter", so it's still a kepub if I'm not mistaken ? So it appears the kepub reconversion is breaking something ? Last edited by Simboubou; 01-14-2024 at 01:50 PM. |
01-20-2024, 05:35 AM | #4 |
Junior Member
Posts: 3
Karma: 10
Join Date: Mar 2023
Device: Kobo Forma
|
Unfortunately this is a bug with the kepub reader that happens even with books from the Kobo store when the <rt> tags are written for individual kanji instead of being unified per word.
In your modified edition, I think it should work even in kepub if you remove the <span>'s, since it's the way I see it's written in some store books I have in which the selection of words with furigana works correctly. In the majority of books it won't, though, because the <rt>'s are coded in per kanji. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dictionnary built in ebook | Bid | ePub | 1 | 06-26-2020 01:06 PM |
English to French dictionnary | oldbear | KOReader | 1 | 03-08-2020 07:04 AM |
Strange japanese furigana ruby display (with test file) | fxp33 | Calibre | 5 | 12-24-2013 05:54 PM |
How to code furigana (ruby) for mobi / Paperwhite | totsubo | Kindle Formats | 8 | 04-01-2013 03:02 AM |
Dictionnary mode and suspend | maxime | Kobo Reader | 0 | 12-26-2012 06:46 PM |