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 03-30-2018, 05:00 AM   #1
sinbad21
Junior Member
sinbad21 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Cybook OPUS
Question Problem with entries containing blanks in custom dictionary

Hi,

I have built a custom dictionary from a stardict dictionary containing proper nouns and common nouns, with Penelope. The problem is that when there is any blank or non alphabetic character in an entry, the definition is not found on the Kobo (but found on my Mac in a any dictionary application).

For example, with Abdul, the Kobo gives me 2 entries :

Abdul Hamid II
Abdul Rahman

If I choose one of this entries to see the definition (anyone), I get the message "No definition found". But the definition exists.

If I modify the dictionary before converting it with Penelope, adding " " in keys and definitions, it works in Kobo but I have to tap the " " when searching a word, which is not a valid solution :

"Abdul Hamid II"
"Abdul Rahman"

==> definitions found.

In a native Kobo dictionary, the problem does not occur, a key containing blanks gives the definition. But there is a difference between html files in a kobo native dictionary and my custom dictionary, the tags are different.

In Kobo native dictionary, the tag sequence found in a single html file inside the dictionary is the following :

<?xml version="1.0" encoding="utf-8"?><html><w><p><a name="abaisser"/><b>abaisser</b> ...


In my custom dictionary it is different :

<?xml version="1.0" encoding="utf-8"?><html><w><a name="AB"/><div><b>AB</b> ...

The <p> tag doesn't exist but a <div> tag is present, while there is no <div> tag in Kobo native dictionary.

I have tried to modify directly in the Kobo dictionary, by uncompressing the dicthtml.zip in a folder, then renaming a html file in .zip and decompressing it again. But it does not work, because after recompression the html file is unencrypted, and it seems that html files into a Kobo dictionary must be encrypted.

So what can I do ? Do you thing there is a solution ?

Thanks.
sinbad21 is offline   Reply With Quote
Old 03-30-2018, 06:26 AM   #2
oren64
I need a chapter break
oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.
 
oren64's Avatar
 
Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
I didn't see the problem in English custom dictionaries, But I did see the problem in English-Hebrew dictionary, this problem didn't happen in early firmwares at least 3.x.

The way I fix it is by adding to the end of every line:
Code:
<FONT size="1" color='white'>a</FONT>
It solves the problem, but maybe there is a simpler solution.
oren64 is offline   Reply With Quote
Old 03-30-2018, 04:41 PM   #3
sinbad21
Junior Member
sinbad21 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Cybook OPUS
Quote:
Originally Posted by oren64 View Post
I didn't see the problem in English custom dictionaries, But I did see the problem in English-Hebrew dictionary, this problem didn't happen in early firmwares at least 3.x.

The way I fix it is by adding to the end of every line:
Code:
<FONT size="1" color='white'>a</FONT>
It solves the problem, but maybe there is a simpler solution.
Thanks, my problem seems to be different, because it doesn't work.
sinbad21 is offline   Reply With Quote
Old 04-05-2018, 05:58 AM   #4
sinbad21
Junior Member
sinbad21 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Cybook OPUS
I have found a solution : I have modified the prefix_kobo.py component, line 52. Instead of:
Code:
for character in headword:
I put:
Code:
for character in headword[1:2]:
The problem remains only when a blank is in second position of a keyword, as in a posteriori.
sinbad21 is offline   Reply With Quote
Old 04-07-2018, 05:26 AM   #5
sinbad21
Junior Member
sinbad21 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Cybook OPUS
Finally I found the solution, described in this thread.
sinbad21 is offline   Reply With Quote
Reply

Tags
blank, dictionary, key


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Custom Covers] Blanks, Templates - get them, share them, help to modify and create MiniMouse Calibre 247 02-13-2023 04:30 PM
Two word entries in dictionary asgeirtj Amazon Kindle 5 09-05-2017 06:32 PM
Kobo custom dictionary problem coupe Kobo Developer's Corner 1 01-26-2016 09:45 AM
Are definition listst <dl> suitable for dictionary like entries? jackwoe ePub 0 06-10-2013 02:40 PM
Kindle for PC ignores multi word dictionary idx entries giorgio79 Amazon Kindle 1 04-30-2013 01:29 AM


All times are GMT -4. The time now is 10:53 AM.


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