[Issue 6085] The filename part of a thrown core.exception.UnicodeException is incomprehensible

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 1 02:04:39 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6085



--- Comment #1 from kennytm at gmail.com 2011-06-01 02:00:01 PDT ---
Argh, the Unicode seems to make the post disappeared. Let me try again.



Test case:

==================================
void main() {
    string s = "\xff\xff\xff\0\0\0";
    foreach (dchar c; s) {}
}
==================================
core.exception.UnicodeException@<hundred lines of garbage skipped>
opEqualsMFC6ObjectZb(0): invalid UTF-8 sequence
----------------
5   x                                   0x000096d6 onUnicodeError + 66
6   x                                   0x000151e1 dchar
rt.util.utf.decode(const(char[]), ref uint) + 373
7   x                                   0x00012218 _aApplycd1 + 68
<snip>
----------------
==================================

The problem seems to be that the string __FILE__ sent to onUnicodeError is
corrupt. Further more, the __LINE__ displayed is always 0.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list