module ActiveSupport::Multibyte::Unicode

def decompose(type, codepoints)

Decompose composed characters to the decomposed form.
def decompose(type, codepoints)
  if type == :compatibility
    codepoints.pack("U*").unicode_normalize(:nfkd).codepoints
  else
    codepoints.pack("U*").unicode_normalize(:nfd).codepoints
  end
end