[Issue 14919] utf/unicode should only be validated once

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Aug 13 23:54:57 PDT 2015


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

Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|utf error                   |utf/unicode should only be
                   |                            |validated once

--- Comment #1 from Martin Nowak <code at dawg.eu> ---
(In reply to Vladimir Panteleev from comment
https://issues.dlang.org/show_bug.cgi?id=14519#c25)
> Although I think this approach is acceptable (as long as the program halts
> regardless of compilation flags, which shouldn't be a problem), I would like
> to note that there are situations in which it is impractical to either
> convert or validate the data. One example is implementations of text-based
> network protocols (e.g. HTTP, NNTP, SMTP). Here, neither converting
> everything to UTF-8 or verifying that it is valid UTF-8 works, because
> text-based protocols often embed raw binary data. The program only needs to
> parse the ASCII text parts, so the ideal solution would be a string handling
> library which never decodes UTF-8 (something D doesn't have).

Such text protocols don't

--


More information about the Digitalmars-d-bugs mailing list