You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR seems necessary for Unicode support in the REPL, so I think it's fair to ask how it should behave in the edge cases, when a stream is terminated with an incomplete code point.
First let me say that like readByte I assume if there are multiple codePoints still in the buffer then calling readCodepoint would continue to read them out one by one until the EOF is hit... please correct me if anyone disagrees.
I assume if the the input stream is still open and we have an incomplete code point in the buffer that we'd go async and wait for more input to complete the code point. (just like we go for waiting for a fill line with readLine)
LIke the other read methods, when EOF is hit the question is abort or return null.
The last interesting question here is if we get to the end of the input stream (it closes) and only have "half a character" left.
Should we just return a short string of gibberish (invalid Unicode)?
Should this raise an error itself?
Should the invalid half character be silently dropped?
The text was updated successfully, but these errors were encountered:
Related: #71
This PR seems necessary for Unicode support in the REPL, so I think it's fair to ask how it should behave in the edge cases, when a stream is terminated with an incomplete code point.
readByte
I assume if there are multiple codePoints still in the buffer then callingreadCodepoint
would continue to read them out one by one until the EOF is hit... please correct me if anyone disagrees.readLine
)LIke the other read methods, when EOF is hit the question is abort or return
null
.The last interesting question here is if we get to the end of the input stream (it closes) and only have "half a character" left.
The text was updated successfully, but these errors were encountered: