[Issue 20134] New: autodecode should use replacementDchar rather than throwing on invalid
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 15 22:51:17 UTC 2019
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: nobody at puremagic.com
Reporter: bugzilla at 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.
--
More information about the Digitalmars-d-bugs
mailing list