http://d.puremagic.com/issues/show_bug.cgi?id=5247
Summary: std.utf.stride() should not return 0xFF Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: rsi...@gmail.com --- Comment #0 from Shin Fujishiro <rsi...@gmail.com> 2010-11-21 01:12:18 PST --- stride(s, i) returns 0xFF, or 255, if s[i] is not a UTF-8 lead byte. This design allows the function to silently succeed when the input is broken: auto str = new char[](300); str[0] = '\xFE'; // broken str = str[str.stride(0) .. $]; // jumps 255 bytes stride(s, i) should throw an exception if s[i] is not a lead byte. Or at least the error value should not be 255. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------