Search

Char.IsLetter returns True for masculine ordinal character by AlchemistMatt

Closed
as By Design Help for as By Design

1
0
Sign in
to vote
Type: Bug
ID: 773980
Opened: 12/10/2012 5:24:35 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I have found that Char.IsLetter() returns True for the masculine ordinal character, described at http://en.wikipedia.org/wiki/Ordinal_indicator. The Char.GetUnicodeCategory() function reports it is a LowercaseLetter, but I would think it should be reported as a symbol. I have tested this in both .NET 4.0 and .NET 4.5.

Of course, this could be "by design"; I'll let you respond.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

.NET Framework 4.5

Steps to reproduce

Run this code (note that you need to enter the ordinal indicator in the first two commands, not the degree sign).

' Ordinal Indicator
Console.WriteLine(Char.IsLetter("º"c))
Console.WriteLine(Char.GetUnicodeCategory("º"c).ToString)

' Degree Sign
Console.WriteLine(Char.IsLetter("°"c))
Console.WriteLine(Char.GetUnicodeCategory("°"c).ToString())

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

Running the above code returns "True" and "LowercaseLetter" for the ordinal indicator. It returns "False" and "OtherSymbol" for the degree sign.

Expected results

Running the above code should return "False" and "OtherSymbol" for both symbols.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/21/2013 at 7:49 AM
Thank you for your feedback. This issue is actually by-design.

We are following the Unicode standard. It defined Lo (Other_Letter) as lowercase.

Regards,
Immo Landwerth
.NET Framework team
Posted by Microsoft on 12/10/2012 at 8:32 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Posted by Microsoft on 12/10/2012 at 5:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.