Re: MARC-perl: different versions yield different results

2010-10-12 Thread Ed Summers
On Tue, Oct 12, 2010 at 9:05 AM, Leif Andersson wrote: > To sum up. > I think it is a good idea to make the MARC blob a binary object, so to speak. > I don't know if you should just apply my simple hacks to CPAN code. > Or if it is called for a thourough re-write of some parts of the modules. > >

Re: MARC-perl: different versions yield different results

2010-10-12 Thread Leif Andersson
___ Från: Al [ra...@berkeley.edu] Skickat: den 12 oktober 2010 17:45 Till: Leif Andersson; perl4lib@perl.org Ämne: Re: MARC-perl: different versions yield different results Thanks, that does indeed do the trick. >MARC::Record 2.0.0, the so called unicode version,

Re: MARC-perl: different versions yield different results

2010-10-12 Thread Leif Andersson
without any problems that I can recall. :-) /Leif Från: ed.summ...@gmail.com [ed.summ...@gmail.com] för Ed Summers [...@pobox.com] Skickat: den 12 oktober 2010 17:13 Till: perl4lib@perl.org Ämne: Re: MARC-perl: different versions yield different results Hi

Re: MARC-perl: different versions yield different results

2010-10-12 Thread Al
Thanks, that does indeed do the trick. >MARC::Record 2.0.0, the so called unicode version, introduced the problem you describe. Good to know. I hadn't gleaned that fact from all the messages I'd read. I have a second, related question: MARC::Record 2.0.0 and Encode 2.40 are now more sensit

Re: MARC-perl: different versions yield different results

2010-10-12 Thread Galen Charlton
Hi Leif, On Tue, Oct 12, 2010 at 10:58 AM, Leif Andersson wrote: > To change directly in code like this is totally "no-no" to many programmers. > If you feel uncomfortable with this, there are other methods doing the same > stuff. As it happens, this is the very mailing list where patches to MA

Re: MARC-perl: different versions yield different results

2010-10-12 Thread Ed Summers
On Mon, Oct 11, 2010 at 3:03 PM, Al wrote: > The problem is my record batches are a mixture of UTF8 and MARC8 and > explicitly > setting binmode screws things up. I need a solution that transparently > handles a mix of record encodings. Hmm, yeah the idea w/ MARC::Record v2.x was that binmode wo

Re: MARC-perl: different versions yield different results

2010-10-12 Thread Ed Summers
Hi Leif, Is the downside to this approach that you are modifying a CPAN module in place, or is it something to do with the behavior of 'use bytes'? Would there be any undesirable side effects to adding 'use bytes' to MARC::File::USMARC::encode on CPAN? //Ed On Tue, Oct 12, 2010 at 7:58 AM, Leif

Re: MARC-perl: different versions yield different results

2010-10-12 Thread Leif Andersson
This has nothing to do with Perl versions. MARC::Record 1.38 and earlier does not display this problem. MARC::Record 2.0.0, the so called unicode version, introduced the problem you describe. That is when writing records: causing incorrect leader length and corrupted utf-8 There are different w

Re: MARC-perl: different versions yield different results

2010-10-11 Thread Saiful Amin
> > When I process the record above in perl 5.8, MARC::Record version 1.38, and > Encode.pm version 2.12, the record comes out fine. > > When I use perl 5.10, MARC::Record version 2.0.0, and Encode.pm 2.40 the > record comes out corrupted and MARC::Record will no longer read the result. > I tried