I have string "Ärger,-Ökonom-i-Übermut-ẞ-ß" and when I run IndexOf("--") I get a result of 23. If I use Replace
on same string nothing gets replaced.
I don't understand what is happening, so can someone please shed some light on this issue? Application Culture is set on Croatian, it's not German, and framework version is 3.5.
Changing culture to German (de-DE) doesn't change this strange behavior.
Here is the screenshot from the debugger:
Since Mr Lister doesn't want his well deserved upvotes, I will paste his comment here, and accept answer.
I'm afraid that U+1E9E is undefined according to .NET 3.5, because this character didn't exist in Unicode 4.0 (or whatever version of Unicode .NET 3.5 uses). It's a fairly new addition (uppercase version of German ß). So the IndexOf function ignores it. If you have any control over the text, you could change the character to ß or SS, whatever is more appropriate. Of course the better solution is to upgrade .NET to v4.0!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With