[Issue 8322] New: std.string.chomp does not handle combining characters correctly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 29 22:45:12 PDT 2012


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

           Summary: std.string.chomp does not handle combining characters
                    correctly
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: jmdavisProg at gmx.com


--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-06-29 22:47:40 PDT ---
These two succeed:

assert(equal(chomp("hello \u00E9", "\u00E9"), "hello "));
assert(equal(chomp("hello e\u0301", "e\u0301"), "hello "));

These two fail:

assert(equal(chomp("hello \u00E9", "e\u0301"), "hello "));
assert(equal(chomp("hello e\u0301", "\u00E9"), "hello "));

It's because chomp makes the erroneous assumption that if a string ends with
the delimiter, the code points match exactly.

-- 
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