fix issue 12419

Test that UTF-8 decoding yields a value in the valid range.
UTF-8 may encode values beyond these covered by [0, 0x10FFFF].
Merge pull request #2038 from blackwhale/issue-12419

Fix issue 12419: assertion failure in std.utf