Skip Menu |
 

This queue is for tickets about the DBD-XBase CPAN distribution.

Report information
The Basics
Id: 77915
Status: new
Priority: 0/
Queue: DBD-XBase

People
Owner: Nobody in particular
Requestors: kas [...] fi.muni.cz
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.03
Fixed in: (no value)

Attachments


Subject: XBase broken with 'use open ":std" => ":utf8"'
Download (untitled) / with headers
text/plain 567b
XBase/Base.pm tries to open DBF files as binary (binmode($fh)), which is not sufficient when 'use open ":std" => ":utf8"' is set in the surrounding environment. I suggest to replace "binmode($fh)" with more explicit "binmode($fh, ':bytes')". Patch attached. Also, I am not sure about the "unless $external_fh" suffix to the above bindmode() call. I think DBF files are defined as binary, so it is perfectly legal for XBase to switch also the pre-existing filehandle to the binary mode. So my other suggestion is to remove the "unless $external_fh" clause altogether.
Subject: DBD-XBase-1.03-utf8.patch
--- XBase/Base.pm.orig 2011-03-03 20:39:28.000000000 +0100 +++ XBase/Base.pm 2012-06-20 10:24:02.707790548 +0200 @@ -96,7 +96,7 @@ $self->{'tell'} = 0 if $SEEK_VIA_READ; $fh->autoflush(); - binmode($fh) unless $external_fh; + binmode($fh, ':bytes') unless $external_fh; @{$self}{ qw( fh filename rw ) } = ($fh, $options{'name'}, $rw); ## $self->locksh();


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.