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)

Cheers,

--
Joshua Ferraro               VENDOR SERVICES FOR OPEN-SOURCE SOFTWARE
President, Technology       migration, training, maintenance, support
LibLime                                Featuring Koha Open-Source ILS
[EMAIL PROTECTED] |Full Demos at http://liblime.com/koha |1(888)KohaILS

On Tue, Feb 14, 2006 at 05:50:25PM +0100, Paul POULAIN wrote:
> I have some questions with UTF-8 & zebra (& MARC::Record & MARC::XML, 
> but I'm not sure to know which tool is responsible of my problem)
> 
> In my zebra config file I have :
> recordType: grs.xml
> encoding utf-8
> 
> MARC::Record is the sourceforge 2.0 version (installed today)
> zebra version is 1.3.32
> MARC::XML version is 0.7
> YAZ version: 2.1.12
> 
> The following code (some line removed) :
> >     $Zconn->option(cqlfile => 
> >     C4::Context->config("intranetdir")."/zebra/pqf.properties");
> >     $Zconn->option(preferredRecordSyntax => "xml");
> >     my $rs = $Zconn->search($q);
> >     for (my $i=$offset-1; $i <= $maxrecordnum-1; $i++) {
> >             my $record = 
> >             MARC::Record->new_from_xml($rs->record($i)->raw());
> >             warn "REC2 = ".$record->as_formatted;
> >     }
> shows in log :
> Dictionnaire fran\xc3\xa7ais-anglais des termes relatifs \xc3\xa0 
> l'\xc3\xa9lectronique, l'\xc3\xa9lectrotechnique,
> \xc3\xa7 is a ç, it should be 00E7,
> \xc3\xa0 is a à, it should be 00E0,
> \xc3\xa9 is a é, it should be 00E9.
> (or i'm wrong somewhere, I must admit i'm a newbie at utf-8, you'll let 
> me know)
> 
> (If I directly dump the XML record returned by zebra, I get the same 
> result, so the problem is probably not in MARC::Record or MARC::XML)
> 
> Could someone help me finding the origin of the problem ?

Reply via email to