module UnicodeNormalize

def self.hangul_decomp_one(target)

# Hangul Algorithm
def self.hangul_decomp_one(target)
  syllable_index = target.ord - SBASE
  return target if syllable_index < 0 || syllable_index >= SCOUNT
  l = LBASE + syllable_index / NCOUNT
  v = VBASE + (syllable_index % NCOUNT) / TCOUNT
  t = TBASE + syllable_index % TCOUNT
  (t==TBASE ? [l, v] : [l, v, t]).pack('U*') + target[1..-1]
end