Open
Description
I also noticed when searching for
IndexOutOfRangeException
thatUTF8toUTF16
can throw it, also. This is unusual to have to deal with, so we should change this method toTryUTF8toUTF16
so we can eliminate this exception that is clearly exclusively meant for control flow when the UTF8 format is invalid. It is caught in several places to do a fallback, and we should fix this. Note that we will most likely be converting thebyte[]
overload to useReadOnlySpan<byte>
and getting rid of theoffset
andlength
parameters.
Originally posted by @NightOwl888 in #1018 (comment)
Activity