dmd foreach loops throw exceptions on invalid UTF sequences, use replacementDchar instead
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Fri Nov 5 09:57:45 UTC 2021
On Friday, 5 November 2021 at 09:34:31 UTC, Guillaume Piolat
wrote:
> How about just assert(false)? It is @nogc and foreach over
> invalid utf-8 is a logic error (as you didn't sanitize).
It is even worse, it is a type error. If "utf-8" is to be a
meaningful type you should be allowed to assume that it follows
the spec.
More information about the Digitalmars-d
mailing list