code: private static int makeIndex(int c)
      {
          // check the predefined indices
          if(c >= 0x00C0 && c < 0x0140)
              return LATININDEX;
          else if(c >= 0x0250 && c < 0x02D0)
              return IPAEXTENSIONINDEX;
          else if(c >= 0x0370 && c < 0x03F0)
              return GREEKINDEX;
          else if(c >= 0x0530 && c < 0x0590)
              return ARMENIANINDEX;
          else if(c >= 0x3040 && c < 0x30A0)
              return HIRAGANAINDEX;
          else if(c >= 0x30A0 && c < 0x3120)
              return KATAKANAINDEX;
          else if(c >= 0xFF60 && c < 0xFF9F)
              return HALFWIDTHKATAKANAINDEX;
  
          // calculate index
          else if(c >= 0x0080 && c < 0x3400)
              return (c / 0x80) & 0xFF;
          else if(c >= 0xE000 && c <= 0xFFFF)
              return ((c - 0xAC00) / 0x80) & 0xFF;
              
          // should never happen
          else {
              return RESERVEDINDEX;
          }
      }
docs: Create the index value for a character.
  For more information on this function, refer to table X-3
  <A HREF="http://www.unicode.org/unicode/reports/tr6">UTR6</A>.
  @param c The character in question.
  @return An index for c