[Mono-bugs] [Bug 480178] New: ystem.Globalization.CharUnicodeInfo.GetUnicodeCategory() does not handle surrogate characters appropriately.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 26 19:30:36 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=480178


           Summary: ystem.Globalization.CharUnicodeInfo.GetUnicodeCategory
                    () does not handle surrogate characters appropriately.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: dmitchell at logos.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1

In Microsoft's implementation of .NET, the result of

System.Globalization.CharUnicodeInfo.GetUnicodeCategory("\uD800\uDF80", 0);

is OtherLetter, while Mono returns Surrogate. The reason for this is that while
\uD800 and \uDF80 each belong to the unicode category Surrogate, together, they
form the surrogate pair for UGARITIC LETTER ALPA, which has the unicode
category OtherLetter.

>From what I can tell, Mono's implementation of GetUnicodeCategory never does
any special handling for surrogate pairs.

Reproducible: Always

Steps to Reproduce:
1. Call System.Globalization.CharUnicodeInfo.GetUnicodeCategory("\uD800\uDF80",
0);
2.
3.
Actual Results:  
UnicodeCateogry.Surrogate is returned.

Expected Results:  
UnicodeCategory.OtherLetter should be returned.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list