03-30-2018, 05:00 AM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Cybook OPUS
|
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. |
03-30-2018, 06:26 AM | #2 |
I need a chapter break
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> |
03-30-2018, 04:41 PM | #3 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Cybook OPUS
|
Quote:
|
|
04-05-2018, 05:58 AM | #4 |
Junior Member
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: Code:
for character in headword[1:2]: |
04-07-2018, 05:26 AM | #5 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Cybook OPUS
|
Finally I found the solution, described in this thread.
|
Tags |
blank, dictionary, key |
|
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 |