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

Dukc ajieskola at gmail.com
Fri Nov 5 09:58:24 UTC 2021


On Friday, 5 November 2021 at 03:02:07 UTC, deadalnix wrote:
> On Friday, 5 November 2021 at 02:38:51 UTC, Adam D Ruppe wrote:
>> 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.

It's about decoding, but not autodecoding. Or at least not the 
same autodecoding we usually refer to. Autodecoding is the way 
Phobos v1 treats character arrays when they are used as ranges.

This is about an implicit conversion in the language itself.


More information about the Digitalmars-d mailing list