[Issue 17861] UTF Decode fails with exception

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 26 23:08:45 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17861

--- Comment #6 from Etienne <etcimon at gmail.com> ---
I think it might have thrown this exception in the foreach loop of a string due
to an invalid code point. I don't see `rt.decode` called anywhere else, not
even in phobos.

I'm not sure anyone has actually planned for this behavior, because it's so
marginal, undocumented and difficult to trigger, so I'd say it might affect
mostly some unit tests that could expect it.

Where in documentation does it say that foreach char[] can throw on unicode
error?


https://tour.dlang.org/tour/en/gems/unicode

This specialized article doesn't even talk about any kind of exceptions.

--


More information about the Digitalmars-d-bugs mailing list