if (PerlIO_flush(PerlIONext(f)) != 0) {
code = -1;
}
+ if (SvCUR(e->bufsv)) {
+ /* Did not all translate */
+ e->base.ptr = e->base.buf+SvCUR(e->bufsv);
+ return code;
+ }
}
else if (PerlIOBase(f)->flags & PERLIO_F_RDBUF) {
/* read case */
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
IV code = PerlIOBase_close(aTHX_ f);
if (e->bufsv) {
+ if (e->base.buf && e->base.ptr > e->base.buf) {
+ Perl_croak(aTHX_ "Close with partial character");
+ }
SvREFCNT_dec(e->bufsv);
e->bufsv = Nullsv;
}
the UTF8 we have in bufefr and then ask layer below
*/
PerlIO_flush(f);
+ if (b->buf && b->ptr > b->buf) {
+ Perl_croak(aTHX_ "Cannot tell at partial character");
+ }
return PerlIO_tell(PerlIONext(f));
}
void
call_failure(SV * routine, U8 * done, U8 * dest, U8 * orig)
{
+ /* Exists for breakpointing */
}
static SV *
SKIP:
{
- skip "Multi-byte write is broken",3;
+ #skip "Multi-byte write is broken",3;
print "# dst :encoding test\n";
open(my $src,"<:utf8",$ref) || die "Cannot open $ref:$!";
ok(defined($src) || fileno($src));