On 2/14/06, Paul POULAIN <[EMAIL PROTECTED]> wrote: > Joshua Ferraro a écrit : > > Hi Paul, > > > > This is a problem with the CPAN version of MARC::Record. For > > utf-8 outside the normal ascii range it's not calculating the > > directory offsets properly. If you upgrade MARC::Record to the > > sourceforge version: > > http://sourceforge.net/project/showfiles.php?group_id=1254 > > > > the problem will just 'go away'. (you can test this by > > unpacking the sourceforge version to a local dir, and adding > > a 'use lib' line pointing to it before you overwrite the > > CPAN stuff in your perl4lib) > > >>MARC::Record is the sourceforge 2.0 version (installed today) > > Unless i'm missing something, I already upgraded MARC::Record from > sourceforge 2 hours ago : > /usr/lib/perl5/site_perl/5.8.7/MARC/ tells me : > $VERSION = '2.0'; > > -- > Paul POULAIN et Henri Damien LAURENT > Consultants indépendants > en logiciels libres et bibliothéconomie (http://www.koha-fr.org) >
Is this data coming from a socket via the Perl-ZOOM API? If so, I'll bet that it's the PerlIO layer not seeing the data as UTF-8. To force a string to be seen by Perl as valid UTF-8, you'll need to use Encode; and then push the string of bytes through decode() with my $utf8_string = decode(utft8 => $original_string); If you can get access to the actual file handle for the socket, you could use binmode() against it, but I doubt if you can reach into Perl-ZOOM for that. For more details, see the man pages for Encode, Encode::PerlIO and Encode::Supported. Hope that helps! -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org