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

          Issue ID: 20134
           Summary: autodecode should use replacementDchar rather than
                    throwing on invalid
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nob...@puremagic.com
          Reporter: bugzi...@digitalmars.com

Currently, when the autodecoder encounters an invalid UTF sequence, it throws a
UTFexception. In contrast, the byUTF conversions return a replacementDchar
instead, as does foreach() when decoding.

This enhancement would make the behavior consistent, with the additional
benefits of character processing being @nogc and nothrow and even pure.

--

Reply via email to