Short UTF-8 Sequences will not be caught if InputStream does not support Length property
R-maan opened this issue · 0 comments
R-maan commented
Due to the limitation of StreamReader.Read()
where it returns -1 if no more characters are available - regardless whether there are any sequence left or not, we are using Stream.Length
property to check for short sequences of UTF-8 inputs.
But not all the implementations of Stream
will support Length
.
If an implementation does not support Length property, short utf-8 sequences will not be caught.