I'm writing a program that will automatically sort the index of a Japanese book and group the terms under the associated Japanese letter. I have found numerous instructions, but I'm still unsure how to do it correctly.
I know we need the phonetic translation of a term in order to sort it. So far so good. Since it is possible to write the phonetic translation using hiragana or katakana, which of these characters do I use for sorting?
If say my terms are mixed i.e. the phonetic translation starts with hiragana and katakana letters, do I assign the index terms to the matching hiragana group letter or the matching katakana group letter?
Example: do I place よ terms under the index group letter ヨ? If yes, can I always assign hiragana terms to the associated katakana group letter? I.e. my index will only use katakana grouping letters.
Thanks for any help.