The Unicode letter 700 is an apostrophe modifier : in other words, it changes the letter c. Similarly, if you must use an “e” followed by the character 769 (0x301) , it really won't be 'anymore: e has been changed to be with a sharp accent. For this: é. You will see that the letter is actually two characters: copy it to notepad and press backspace (neatly, right?).
You need to perform the “Ordinal” (byte) comparison without any linguistic comparison. This will find "c" and ignore the linguistic fact that it is modified by the next letter. In my example, the “e” bytes are: (65) (769), so if you beat the bytes in search of 65, you will find it and ignore the fact that (65) (769) is linguistically (233): é. If you search (233) linguistically, it will find the "equivalent" (65) (769):
string find = "abéabcabc"; int index = find.IndexOf("é");
Hope this doesn't bother you too much. If you do this in real code, you should explain exactly what you are doing in the comments: for example, in my example “e” you would like to use semantic equivalence for user data and ordinal equivalence, for example. constants (which, I hope, would not be so different, since your successor preys on you with an ax ).
Mark sowul
source share