New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read from file containing 1-char of malformed UTF returns empty string #6278
Comments
From @zoffixznetThis seem to have existed for a while and isn't due to encoding refactor. 01:24 c: 2017.04 with '/tmp/foo999'.IO { .spurt: Buf.new: 200; dd .open.slurp } Note that for file with two of such chars, the behaviour is what I'd expect it to be: throwing malformed 01:27 m: with '/tmp/foo999'.IO { .spurt: Buf.new: 200, 200; dd .open.slurp } |
I've stumbled upon this while working on the streaming decoder for the JVM backend. If I'm not mistaken, the problem can be shown with plain nqp (in the style that tests in t/nqp/116-streaming-decoder.t are written):
Both tests are passing. As far as I understand, it's totally fine for But I'd expect |
This avoids the problem reported in Raku/old-issue-tracker#6278.
OOC, I tried to pass eof to
|
For the record: With the above patch, NQP's and Rakudo's tests are passing. Spectest look ok, too (there were these failures, which look like flappers: running the test files in isolation didn't show an error most of the time):
|
Migrated from rt.perl.org#131379 (status was 'new')
Searchable as RT131379$
The text was updated successfully, but these errors were encountered: