Here i understand what is happening but how could i improve this example to make the expected asserts true?
In this specific example you could e.g. use std.uni.normalize, which by default puts the string into NFC, which has all the canonical compositions applied (e.g. ë as a single character).
David