I was doing some self-study on DAML and was trying to evaluate if DAML supports unicode characters. I saw in a different question this is supposed to be supported.
But when I ran the following DAML script this returned False:
-- [241] and [100, 771] both represent the Spanish character 'ñ', but
-- one uses a Unicode combining diacritic mark and the other does not
DA.Text.fromCodePoints [100, 771] == DA.Text.fromCodePoints [241]
I assume this returned False because the comparison was done purely byte-by-byte with UTF-8 encoding.
However having two different representations for the same grapheme is pretty common in languages that have ‘accents’ in letters like French and Spanish so I am wondering is there a way to specify these kinds of culturally sensitive equality comparisons.
Specifically is there a way to specify the Unicode Normalization Forms used to control the equality logic?