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

kdevel kdevel at vogtner.de
Mon Nov 15 20:26:46 UTC 2021


On Monday, 15 November 2021 at 11:26:41 UTC, user1234 wrote:
[...]
> I think I was off-topic, my reply was about the filename, e.g
>
> `fname.fromAnsi(cp).toUTF!char.readText()`
>
> you were more talking about the file content apparently ? sorry 
> about that.

I /am/ talking about the filename. In POSIX systems the bytes do 
not mean anything (to the operating system) execpt for the three 
values '\0', '/' and '.' [1].

[1] 
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_170


More information about the Digitalmars-d mailing list