[Issue 21557] New: std.encoding and std.utf do not use replacement char consistently

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 18 14:16:41 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21557

          Issue ID: 21557
           Summary: std.encoding and std.utf do not use replacement char
                    consistently
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: deadalnix at gmail.com

std.utf uses std.utf.replacementDchar, which seems is what unicode actually
expects to happen.

However, std.encoding uses std.encoding.INVALID_SEQUENCE , defined here:
https://github.com/dlang/phobos/blob/master/std/encoding.d#L481

This later value isn't the one expected by the unicode standard.

Additionally, the later value creates a problem because now there are two
values to handle for replacement chars.

--


More information about the Digitalmars-d-bugs mailing list