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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jul 17 00:05:24 PDT 2015


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

--- Comment #32 from Martin Nowak <code at dawg.eu> ---
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.

Also see

https://github.com/D-Programming-Language/druntime/pull/1279

--


More information about the Digitalmars-d-bugs mailing list