Re: what was VMS do here? (was [perl #79960] Setting $/ to read fixed records can corrupt valid UTF-8 input)
[email protected] (Eric Brine) Mon, 5 Mar 2012 15:26:00 -0500
| Newsgroups | perl.perl5.porters,perl.vmsperl |
|---|---|
| Message-ID | <CALJW-qEJRbr=E3xp6-JGe+=dZJxEwFKLvaexGywX6CRJ=8ZN1Q@mail.gmail.com> |
On Sat, Mar 3, 2012 at 6:56 PM, Craig A. Berry <[email protected]> wrote: > So does your second example demonstrate that if you request something > larger than the perlio buffer, then you can get caught mid-character on buffer boundaries as well as > record boundaries? I'm not sure what "caught" means here. It demonstrates that if a character is split across a chunk boundary (which is inevitable), that there is no problem. And does that first 8192-byte chunk get loaded into an SV that is then > invalid if its UTF-8 flag is on? > I don't know the implementation, so I don't know if it's possible for the SV to have its UTF-8 flag on (or if the buffer is an SV at all). I think the real question is: What happens if the second read fails? - Eric