Answers.Body: <p>I've rewritten the whole back-end for <code>.opf</code> generation and that seems to fix the issue.</p>
  <p>Two things, that I've change, might have been the reason for this success (this is not confirmed, I'll followup when I have more information):</p>
  <ul>
  <li>reformatting the templates for the <code>.opf</code> and <code>.html</code> files (removing unnecessary spaces and newlines)</li>
  <li>using UTF-8 BOM in the templates</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-20T15:30:11.040Z
Answers.LastActivityDate: 2022-09-20T15:30:11.040Z
Answers.UserDisplayName: Yanosh Kunsh
Answers.Body: <p>Here is a python script I just created that converts from a word list stored in MySQL into a Kindle dictionary for the Palauan language:
  <a href="https://github.com/tekinged/tekinged.com/blob/main/scripts/mk_kindle_dict.py" rel="nofollow noreferrer">https://github.com/tekinged/tekinged.com/blob/main/scripts/mk_kindle_dict.py</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-04T23:24:24.593Z
Answers.LastActivityDate: 2022-07-04T23:24:24.593Z
Answers.UserDisplayName: John Bent
Body: <p>I'm developing a custom Bulgarian Dictionary for Kindle, in .mobi format (source code is here: <a href="https://github.com/yanosh-k/bulgarian_dictionary" rel="nofollow noreferrer">https://github.com/yanosh-k/bulgarian_dictionary</a>). I've manged to successfully create a working version, but I'm having a problem. The dictionary is case sensitive. I'm not sure if this is due to the language and the encoding or is there some setting that I've overlooked, while generating the .mobi file.</p>
  <p>My process for generating the .mobi file is the following:</p>
  <ol>
  <li>Generate a list of the words, their meaning and inflections, that I want to be in the dictionary. The list is generated from a SQL database and is stored to a plain text file. The text file is UTF-8 encoded, having Unix line endings (LF), and the data is tab delimited in the following format: <code>word</code><kbd>Tab</kbd><code>word id</code><kbd>Tab</kbd><code>html formatted word meaning</code><kbd>Tab</kbd><code>comma separated list of inflections</code>. Each line in the file represents a word. The latest version of the file can be found here: <a href="https://github.com/yanosh-k/bulgarian_dictionary/blob/master/bulgarian_dictionary.txt" rel="nofollow noreferrer">https://github.com/yanosh-k/bulgarian_dictionary/blob/master/bulgarian_dictionary.txt</a> (27.1 MB).</li>
  <li>Generate an OPF file. This is done using a customized version of the tab2opf python script (my version is here: <a href="https://github.com/yanosh-k/bulgarian_dictionary/blob/master/convertors/tab2opf.py" rel="nofollow noreferrer">https://github.com/yanosh-k/bulgarian_dictionary/blob/master/convertors/tab2opf.py</a>, and the original: <a href="https://github.com/apeyser/tab2opf" rel="nofollow noreferrer">https://github.com/apeyser/tab2opf</a>). The latest version of the file can be found here: <a href="https://github.com/yanosh-k/bulgarian_dictionary/tree/master/opf" rel="nofollow noreferrer">https://github.com/yanosh-k/bulgarian_dictionary/tree/master/opf</a>.</li>
  <li>Use <code>kindlegen</code> to convert the .opf file to .mobi file. (Amazon took off the official version from their website, so I use a copy from the Internet Archive: <a href="https://archive.org/details/kindlegen2.9" rel="nofollow noreferrer">https://archive.org/details/kindlegen2.9</a>)</li>
  <li>After the .mobi file is generated, it can be directly uploaded to a Kindle device and used.</li>
  </ol>
  <p>This works great but when I try to select a word, while reading a book on my Kindle, it does not recognize words that start with a capital letter, or  words that all capitalized.
  For example the word <code>старик</code> would be recognized by the dictionary, but when the first letter is capitalized, like so <code>Старик</code>, it says that no such word was found.</p>
  <p><strong>Is this an intended behavior? Should I include all versions of capitalization in the inflected list? And is there a way to make it case-insensitive?</strong></p>
  <p>The information that I've used, to derive the whole process comes from here:</p>
  <ol>
  <li><a href="https://1manfactory.com/create-your-own-kindle-dictionary-for-every-language-for-free/" rel="nofollow noreferrer">https://1manfactory.com/create-your-own-kindle-dictionary-for-every-language-for-free/</a></li>
  <li><a href="https://s3.amazonaws.com/kindlegen/AmazonKindlePublishingGuidelines.pdf" rel="nofollow noreferrer">https://s3.amazonaws.com/kindlegen/AmazonKindlePublishingGuidelines.pdf</a></li>
  </ol>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-10T17:31:44.713Z
Comments.Text: I don't use Kindle so I cannot give you a precise answer. But first of all, what happens if you search a capitalized word on another "official" book? (I assume that you are searching for Старик and you did not find any result since your dictionary contains старик)
Comments.UserDisplayName: mau
Tags: <kindle><kindle-paperwhite><mobi><dictionaries><opf>
Title: How to make a custom Kindle dictionary be case insensitive?
UserDisplayName: Yanosh Kunsh
ThreadText: # How to make a custom Kindle dictionary be case insensitive?
  
  (Asked by: username_0 on 2022-02-14)
  
  I'm developing a custom Bulgarian Dictionary for Kindle, in .mobi format (source code is here: <https://github.com/yanosh-k/bulgarian_dictionary>). I've manged to successfully create a working version, but I'm having a problem. The dictionary is case sensitive. I'm not sure if this is due to the language and the encoding or is there some setting that I've overlooked, while generating the .mobi file.
  
  My process for generating the .mobi file is the following:
  
  1. Generate a list of the words, their meaning and inflections, that I want to be in the dictionary. The list is generated from a SQL database and is stored to a plain text file. The text file is UTF-8 encoded, having Unix line endings (LF), and the data is tab delimited in the following format: `word``Tab``word id``Tab``html formatted word meaning``Tab``comma separated list of inflections`. Each line in the file represents a word. The latest version of the file can be found here: <https://github.com/yanosh-k/bulgarian_dictionary/blob/master/bulgarian_dictionary.txt> (27.1 MB).
  2. Generate an OPF file. This is done using a customized version of the tab2opf python script (my version is here: <https://github.com/yanosh-k/bulgarian_dictionary/blob/master/convertors/tab2opf.py>, and the original: <https://github.com/apeyser/tab2opf>). The latest version of the file can be found here: <https://github.com/yanosh-k/bulgarian_dictionary/tree/master/opf>.
  3. Use `kindlegen` to convert the .opf file to .mobi file. (Amazon took off the official version from their website, so I use a copy from the Internet Archive: <https://archive.org/details/kindlegen2.9>)
  4. After the .mobi file is generated, it can be directly uploaded to a Kindle device and used.
  
  This works great but when I try to select a word, while reading a book on my Kindle, it does not recognize words that start with a capital letter, or words that all capitalized.
  For example the word `старик` would be recognized by the dictionary, but when the first letter is capitalized, like so `Старик`, it says that no such word was found.
  
  **Is this an intended behavior? Should I include all versions of capitalization in the inflected list? And is there a way to make it case-insensitive?**
  
  The information that I've used, to derive the whole process comes from here:
  
  1. <https://1manfactory.com/create-your-own-kindle-dictionary-for-every-language-for-free/>
  2. <https://s3.amazonaws.com/kindlegen/AmazonKindlePublishingGuidelines.pdf>
  
  **Tags:** kindle, kindle-paperwhite, mobi, dictionaries, opf
  
  > **Comments:**
  > **username_1**: I don't use Kindle so I cannot give you a precise answer. But first of all, what happens if you search a capitalized word on another "official" book? (I assume that you are searching for Старик and you did not find any result since your dictionary contains старик)  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2022-09-20. Score: 1
  
  I've rewritten the whole back-end for `.opf` generation and that seems to fix the issue.
  
  Two things, that I've change, might have been the reason for this success (this is not confirmed, I'll followup when I have more information):
  
  * reformatting the templates for the `.opf` and `.html` files (removing unnecessary spaces and newlines)
  * using UTF-8 BOM in the templates
  
  
  ---
  
  ### Answer by username_2 on 2022-07-04. Score: 0
  
  Here is a python script I just created that converts from a word list stored in MySQL into a Kindle dictionary for the Palauan language:
  <https://github.com/tekinged/tekinged.com/blob/main/scripts/mk_kindle_dict.py>
  
  
  ---
  
  