What you need is to normalize the data for comparison: https://dlang.org/phobos/std_uni.html#normalizeFor more reference: https://en.wikipedia.org/wiki/Combining_character-Steve
I checked it again but could not reproduce the original error, it somehow seems that my compare string contained another error. But nevertheless good to know how to deal with encoding errors!