A Philosophy of Software Design

Walter Bright newshound2 at digitalmars.com
Mon Jun 29 07:55:14 UTC 2026


On 6/28/2026 10:16 PM, Jon Degenhardt wrote:
> Unicode error handling is worth attention because of all the trouble it's been 
> for D.

The trouble it's been for D is the autodecoding done in Phobos, which throws 
exceptions when it cannot autodecode.

The best approach is to simply replace the bad code units with the invalid code 
point. If any of the other methods you mentioned are desired, that can be 
implemented by creating a filter which looks for an invalid code point, and then 
throws or deletes it or whatever the filter is programmed to do.



More information about the Digitalmars-d mailing list