develooper Front page | perl.vmsperl | Postings from March 2012

Re: what was VMS do here? (was [perl #79960] Setting $/ to read fixedrecords can corrupt valid UTF-8 input)

Thread Previous
From:
Eric Brine
Date:
March 5, 2012 12:26
Subject:
Re: what was VMS do here? (was [perl #79960] Setting $/ to read fixedrecords can corrupt valid UTF-8 input)
Message ID:
CALJW-qEJRbr=E3xp6-JGe+=dZJxEwFKLvaexGywX6CRJ=8ZN1Q@mail.gmail.com
On Sat, Mar 3, 2012 at 6:56 PM, Craig A. Berry <craigberry@mac.com> 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


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About