dmd foreach loops throw exceptions on invalid UTF sequences, use replacementDchar instead
Guillaume Piolat
first.last at gmail.com
Fri Nov 5 09:34:31 UTC 2021
On Thursday, 4 November 2021 at 02:26:20 UTC, Walter Bright wrote:
> https://issues.dlang.org/show_bug.cgi?id=22473
>
> I've tried to fix this before, but too many people objected.
>
> Are we fed up with this yet? I sure am.
>
> Who wants to take up this cudgel and fix the durned thing once
> and for all?
>
> (It's unclear if it would even break existing code.)
How about just assert(false)? It is @nogc and foreach over
invalid utf-8 is a logic error (as you didn't sanitize).
More information about the Digitalmars-d
mailing list