dmd foreach loops throw exceptions on invalid UTF sequences, use replacementDchar instead

deadalnix deadalnix at gmail.com
Fri Nov 5 03:02:07 UTC 2021


On Friday, 5 November 2021 at 02:38:51 UTC, Adam D Ruppe wrote:
> On Friday, 5 November 2021 at 02:06:01 UTC, deadalnix wrote:
>> On Thursday, 4 November 2021 at 02:26:20 UTC, Walter Bright 
>> wrote:
>>> https://issues.dlang.org/show_bug.cgi?id=22473
>>
>> For the love of god, if you are going to make a breaking 
>> change there, just remove autodecoding altogether.
>
> This post isn't about autodecoding. With foreach, you opt into 
> the decoding by specifically asking for it.

Very clearly it is, because if you don't decode, then you don't 
do replacement chars or exceptions.


More information about the Digitalmars-d mailing list