Re: What is a Jamo, and why is it staring at me?

From: Mike (mike-list@pobox.com)
Date: Wed Jun 14 2006 - 17:17:15 CDT

  • Next message: Kenneth Whistler: "Re: What is a Jamo, and why is it staring at me?"

    > I don't even know what a Jamo is. Or what it does. Or who needs it, or
    > why, or what it looks like. Is a Jamo a name that Unicode made up or is
    > it a proper name used by certain people?

    A jamo is a Korean "letter." They combine to form syllables.
    There are 11,172 precomposed syllables that decompose in NFD
    according to an algorithm. Because there is an algorithm to
    decompose them, they are not all listed in UnicodeData.txt.

    A syllable decomposes into a leading (L) jamo, a vowel (V),
    and a trailing jamo (T).

    Here is partial code to do the decomposition:

         // Hangul decomposition parameters

         static const uint SBase = 0xAC00;
         static const uint LBase = 0x1100;
         static const uint VBase = 0x1161;
         static const uint TBase = 0x11A7;
         static const uint LCount = 19;
         static const uint VCount = 21;
         static const uint TCount = 28;
         static const uint NCount = 588; // VCount * TCount;
         static const uint SCount = 11172; // LCount * NCount;
         static const uint SEnd = 0xD7A3; // SBase + SCount - 1;

         ....

         if ((u_Char >= SBase) && (u_Char <= SEnd))
         {
             uint SIndex = u_Char - SBase;
             uint L = LBase + SIndex / NCount;
             uint V = VBase + (SIndex % NCount) / TCount;
             uint T = TBase + SIndex % TCount;

             p_Array->u_Length = (T == TBase) ? 2 : 3;
             p_Array->array[0] = L;
             p_Array->array[1] = V;
             p_Array->array[2] = T;
         }

    Mike



    This archive was generated by hypermail 2.1.5 : Wed Jun 14 2006 - 17:25:17 CDT