[Issue 14519] Get rid of unicode validation in string processing

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jul 17 12:35:46 PDT 2015


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

--- Comment #35 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
(In reply to Martin Nowak from comment #32)
> Summary:
> 
> We should adopt a new model of unicode validations.
> The current one where every string processing function decodes unicode
> characters and performs validation causes too much overhead.
> A better alternative would be to perform unicode validation once when
> reading raw data (ubyte[]) and then assume any char[]/wchar[]/dchar[] is a
> valid unicode string.
> Invalid encodings introduced by string processing algorithms are programming
> bugs and thus do not warrant runtime checks in release builds.

Exactly.

--


More information about the Digitalmars-d-bugs mailing list