Skip Menu |
Report information
Id: 131379
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [IO] read from file containing 1-char of malformed UTF returns empty string
Download (untitled) / with headers
text/plain 833b
This 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 } 01:24 committable6 Zoffix, ¦2017.04: «""» 01:24 Zoffix m: with '/tmp/foo999'.IO { .spurt: Buf.new: 200; dd .open.slurp } 01:24 camelia rakudo-moar 094e77: OUTPUT: «""␤» Note that for file with two of such chars, the behaviour is what I'd expect it to be: throwing malformed UTF8 error, same as you get when decoding Buf.new(200): 01:27 m: with '/tmp/foo999'.IO { .spurt: Buf.new: 200, 200; dd .open.slurp } 01:27 camelia rakudo-moar 094e77: OUTPUT: «Malformed UTF-8␤ in block <unit> at <tmp> line 1␤␤» 01:25 m: Buf.new(200).decode 01:25 camelia rakudo-moar 094e77: OUTPUT: «Malformed termination of UTF-8 string␤ in block <unit> at <tmp> line 1␤␤»


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org