[Issue 17861] New: UTF Decode fails with exception
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 26 20:45:46 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17861
Issue ID: 17861
Summary: UTF Decode fails with exception
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: etcimon at gmail.com
When decoding UTF code points, the invalid characters should be replaced by ?
rather than throwing errors. Most uses for a UTF parser are read-only and this
breaks any application for no reason.
ie. the `decode` function should not behave like it's doing a unit test on all
UTF text.
The solution in my program is:
https://github.com/dlang/druntime/blob/master/src/rt/util/utf.d#L292
Should be replaced by: return '?'
--
More information about the Digitalmars-d-bugs
mailing list