[Mono-bugs] [Bug 362740] Support supplementary chars in C# \U form

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 21 17:12:32 EDT 2008


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

User andyhume32 at yahoo.co.uk added comment
https://bugzilla.novell.com/show_bug.cgi?id=362740#c3


Andy Hume <andyhume32 at yahoo.co.uk> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
             Status|RESOLVED                                        |REOPENED
         Resolution|FIXED                                           |




--- Comment #3 from Andy Hume <andyhume32 at yahoo.co.uk>  2008-08-21 15:12:32 MDT ---
Any reason why the check integers in the test aren't in hexadecimal?  In hex
it's apparent that the test (and the implementation) is wrong. :-,(

A example patch to the test is attached.  Note that the 0x41 byte in the input
is correctly now apparent in the result values where it wasn't before.

The implementation fault is likely within the following code.
   if (total >= 0x00010000) {
      total = ((total - 0x00010000) / 0x0400 + 0xD800);
      surrogate = ((total - 0x00010000) % 0x0400 + 0xDC00);
   }
'total' is used in the 'surrogate' calculation but that's *after* it's been
modified itself! :-)  Swap the two lines?


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


More information about the mono-bugs mailing list