In scala:
val c1 = "Idee\u0301"
val c2 = "Ide\u00e9"
c1: String = Ideé
c2: String = IdeƩ
however
res0: Boolean = false
so for the rescue, we need to normalize them first:
val n1 = Normalizer.normalize(c1, Normalizer.Form.NFC)
val n2 = Normalizer.normalize(c2, Normalizer.Form.NFC)
n1 == n2
res1: Boolean = true
Simple!
No comments:
Post a Comment