[Koha-zebra] ZOOM error 10002 "Encoding failed" from diag-set 'ZOOM'

Sebastian Hammer quinn at indexdata.com
Tue Jan 17 18:46:51 CET 2006


Hi Paul,

My sense is that this is not a Zebra problem but a client-side problem.

Would you be able to reproduce this with a short Perl script that does 
not depend on any external libraries (other than ZOOM)? That would 
greatly help us in nailing down the problem.

All the best,

--Sebastian

Paul POULAIN wrote:

> Hi,
>
> Sorry to bother you, but I can't solve the 10002 "encoding failed" 
> error...
>
> I checked that yaz/zoom/zebra are uptodate. I recompiled them. (I also 
> am sure I have iconv and expat package)
>
> whatever my zebra.cfg file contains, I alway get this error :-(
>
> Here is my last zebra.cfg :
> =============
> profilePath: ${srcdir:-.}:/usr/local/share/idzebra/tab/
> attset: bib1.att
> attset: explain.att
> recordType: grs.marcxml
> lockDir: lock
> setTmpDir: tmp
> keyTmpDir: tmp
> memMax: 100
> perm.anonymous: rw
> encoding utf-8
> storeKeys:1
> storeData:1
>
> Here is my script :
> =================
> It just creates the zebra DB (that I drop everytime with a rm -rf 
> *.mf), and tries to recordInsert a simple XML file
> The error 10002 is here wether I have the encoding="UTF-8" or not.
>
>
> #!/usr/bin/perl
> use strict;
> use C4::Context;
> use C4::Biblio;
> use ZOOM;
> my $dbh = C4::Context->dbh;
> my $Zconn;
> eval {
>     $Zconn = new ZOOM::Connection('localhost','2100');
> };
> if ($@) {
>     print "Error ", $@->code()," : ",$@->message()."\n";
>     die;
> }
> my $Zpackage = $Zconn->package();
> $Zpackage->option(databaseName => 'Koha');
> $Zpackage->send("create");
>
> my $record='
> <?xml version="1.0" encoding="UTF-8"?>
> <collection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xsi:schemaLocation="http://www.loc.gov/MARC21/slim 
> http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" 
> xmlns="http://www.loc.gov/MARC21/slim">
> <record>
>   <leader>00754     2200229   4500</leader>
>   <controlfield tag="001">2</controlfield>
>   <datafield tag="010" ind1=" " ind2=" ">
>     <subfield code="a">2729843132</subfield>
>     <subfield code="d">190 F</subfield>
>   </datafield>
>   <datafield tag="090" ind1=" " ind2=" ">
>     <subfield code="9">1</subfield>
>     <subfield code="a">1</subfield>
>   </datafield>
>   <datafield tag="105" ind1=" " ind2=" ">
>     <subfield code="a">y       00  y</subfield>
>   </datafield>
>   <datafield tag="200" ind1="1" ind2=" ">
>     <subfield code="a">Introduction aux probas</subfield>
>     <subfield code="f">Jean Pierre DELMAS</subfield>
>   </datafield>
>   <datafield tag="606" ind1=" " ind2=" ">
>     <subfield code="9">3339</subfield>
>     <subfield code="9">3321</subfield>
>     <subfield code="a">MATHEMATIQUES</subfield>
>   </datafield>
>   <datafield tag="686" ind1=" " ind2=" ">
>     <subfield code="a">LIVR</subfield>
>   </datafield>
>   <datafield tag="995" ind1=" " ind2=" ">
>     <subfield code="b">CDI</subfield>
>     <subfield code="c">CDI</subfield>
>     <subfield code="e">SL</subfield>
>     <subfield code="f">Non inventorie</subfield>
>     <subfield code="j">000498</subfield>
>     <subfield code="o">2</subfield>
>     <subfield code="9">1</subfield>
>   </datafield>
> </record>
> </collection>
> ';
> my $Zpackage = $Zconn->package();
> $Zpackage->option(databaseName => 'Koha');
> $Zpackage->option(action => "recordInsert");
> $Zpackage->option(record => $record);
> $Zpackage->send("update");
> $Zpackage->destroy;
>

-- 
Sebastian Hammer, Index Data
quinn at indexdata.com   www.indexdata.com
Ph: (603) 209-6853







More information about the Koha-zebra mailing list