Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 01-13-2024, 08:38 AM   #1
Simboubou
Connoisseur
Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.
 
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>
This will display 行方不明 (the kanjis) and, above it, ゆくえふめい in a smaller font (the reading in hiragana)

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 12:37 PM.
Simboubou is offline   Reply With Quote
Old 01-14-2024, 07:43 AM   #2
Cootey
Absentminded Reader
Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.
 
Cootey's Avatar
 
Posts: 1,106
Karma: 6463851
Join Date: Apr 2017
Device: Kobo Mini, Clara HD, Elipsa; Kindle Paperwhite 3 & 4; iOS eReader 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.
Cootey is offline   Reply With Quote
Old 01-14-2024, 12:42 PM   #3
Simboubou
Connoisseur
Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.
 
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>
into this:
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 12:50 PM.
Simboubou is offline   Reply With Quote
Old 01-20-2024, 04:35 AM   #4
paret
Junior Member
paret began at the beginning.
 
paret's Avatar
 
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.
paret is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dictionnary built in ebook Bid ePub 1 06-26-2020 12:06 PM
English to French dictionnary oldbear KOReader 1 03-08-2020 06:04 AM
Strange japanese furigana ruby display (with test file) fxp33 Calibre 5 12-24-2013 04:54 PM
How to code furigana (ruby) for mobi / Paperwhite totsubo Kindle Formats 8 04-01-2013 02:02 AM
Dictionnary mode and suspend maxime Kobo Reader 0 12-26-2012 05:46 PM


All times are GMT -4. The time now is 09:54 AM.


MobileRead.com is a privately owned, operated and funded community.