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

Ryan Heath <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <[email protected]>
On Mon, Sep 8, 2008 at 12:58 PM, Per Bolmstedt
<[email protected]> wrote:

> This sounds like a non-sequitur to me, since I would have expected the
> lengths to be the same, even if the contents differ.
I was thinking more of "roma{null}garbage", when printed it would
print "roma" but its length would be 12 instead of 4.

> 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?

Thanks I'll try that.

// Ryan

===================================
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.