G
Guest
Hi!
Perhaps someone from Microsoft could comment on this behaviour I've just
stumbled across:
String and StringBuilder have a problem with the german ß (szlig).
They assume that 'ß' is equal to 'ss', which is not true!
Calling<pre>"lassen".IndexOf("ß")</pre> yields 2 instead of -1,
a call to <pre>"Größe".IndexOf("ss")</pre> yields 3 instead of -1.
<pre>"lassen".CompareTo("laßen")</pre> returns 0!
String comparison is really essential, how can such a bug slip through?
And what to do about it?
Regards,
Martin Müller
Perhaps someone from Microsoft could comment on this behaviour I've just
stumbled across:
String and StringBuilder have a problem with the german ß (szlig).
They assume that 'ß' is equal to 'ss', which is not true!
Calling<pre>"lassen".IndexOf("ß")</pre> yields 2 instead of -1,
a call to <pre>"Größe".IndexOf("ss")</pre> yields 3 instead of -1.
<pre>"lassen".CompareTo("laßen")</pre> returns 0!
String comparison is really essential, how can such a bug slip through?
And what to do about it?
Regards,
Martin Müller