Re: String.Compare seems to fail when it should not

Per Bolmstedt <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <LISTSERV%[email protected]>
On Mon, 8 Sep 2008 12:38:32 +0200, Ryan Heath <[email protected]>
wrote:

> At first I thought the internal representation of the strings where
> not equal, so I logged the length of the strings. But even their
> lengths are the same! :S

This sounds like a non-sequitur to me, since I would have expected the
lengths to be the same, even if the contents differ. Are you sure "romA"
and "ROMA" in your example really contain the same characters? There are
several Unicode code points to achieve the same result for at least one of
those letters. Can you find two strings that don't Compare() to 0 and print
the Unicode code point for each letter?

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.