https://issues.dlang.org/show_bug.cgi?id=14519
--- Comment #7 from Vladimir Panteleev <[email protected]> --- (In reply to Jonathan M Davis from comment #6) > Yikes. That is far worse than throwing Exceptions, since it would kill your > program, and it's indicative of a bug in the program rather than bad input. Yes. The bug is that the string should've been sanitized. > But most programs just don't care about how valid the > Unicode is, Maybe most programs YOU write. > and the fact that throwing is how it's handled is incredibly > annoying. I can see how it can be annoying - when you don't care about your data. > It forces validation on all programs whether they need it or not, > and it makes it so that string-based code can pretty much never be nothrow. Throwing errors is allowed in nothrow code. > Using the replacement character in the stead of invalid unicode is exactly > what it was created for in the first place. Yes, in circumstances when you don't care about the "invalid" data, which should always be opt-in. --
