I tested with the record you sent Ed and me, and everything seems to
work for me ... comparing the preprocessed XML with a copy that I
round-tripped through MARC::Record and MARC::File::XML, they look the
same. Here's my little test script (unimarc-test.pl):
----------------------------------------------
#!/usr/bin/perl
# USAGE: ./unimarc-test.pl < test.xml
use MARC::Record;
#use MARC::File::XML ( RecordFormat => 'UNIMARC' );
use MARC::File::XML;
MARC::File::XML->default_record_format('UNIMARC');
binmode(STDIN,':utf8');
binmode(STDOUT,':utf8');
$/ = undef;
my $xml = <>;
my $r = MARC::Record->new_from_xml($xml); # ,'utf8'); #,'UNIMARC');
print $r->as_xml(); #'UNIMARC');
print $r->as_usmarc();
__END__
As you can see, I tested several variants of the UNIMARC flag, and
even tested not sending the encoding to new_from_xml() ... it all
seems to work for me, and I'm not sure what problems you're seeing.
Perhaps you just needed to set your binmode for the XML source?
-miker
On 3/17/06, Paul POULAIN <[EMAIL PROTECTED]> wrote:
> Mike Rylander a écrit :
> > CVS checkout intsructions
> > cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/marcpm login
> > cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/marcpm co
> > -P marc-xml
> >
> > Then,
> > cd marc-xml
> > perl Makefile.PL
> > make
> > make test
> >
> > And assuming 'make test' succeeds ...
> > make install
>
> I updated MARC::record (2.000), MARC::Charset (0.920) and
> MARC::File::xml (0.810 ???) from sourceforge.
>
> I tested with a unimarc xml file (that I've send to you by pm), without
> change.
> what did I make wrong ?
> --
> Paul POULAIN et Henri Damien LAURENT
> Consultants indépendants
> en logiciels libres et bibliothéconomie (http://www.koha-fr.org)
>
--
Mike Rylander
[EMAIL PROTECTED]
GPLS -- PINES Development
Database Developer
http://open-ils.org