Re: reading and writing of utf-8 with marc::batch

2013-03-26 Thread Leif Andersson
Hi Eric, my first guess would be your terminal is not utf8. If you comment out #binmode( STDOUT, :utf8 ); and that does the trick, then you can start looking for how to change your terminal settings. (And that can sometimes be a rather frustrating task, I'm afraid) /Leif Andersson Stockholm UL

Re: MARC::Charset 1.34

2013-02-11 Thread Leif Andersson
It gunzips fine, but then there seems to be something wrong with the tar file... /Leif Andersson Stockholm University Library

Re: MARC::Charset 1.34

2013-02-11 Thread Leif Andersson
Till: Leif Andersson Kopia: perl4lib Ämne: Re: MARC::Charset 1.34 Hi, On Mon, Feb 11, 2013 at 10:50 AM, Leif Andersson leif.anders...@sub.su.semailto:leif.anders...@sub.su.se wrote: It gunzips fine, but then there seems to be something wrong with the tar file... Could you elaborate

Re: Anybody know what this USMARC.pm error is?

2011-05-30 Thread Leif Andersson
I am not sure I really got this. Because if I did: - The error messages in your orig posting were not the exact error messages. - The original posted code was not the actual code producing the errors - And the sample MARC records, supplied to demonstrate the errors, were actually OK Sometimes

Re: MARC blob to MARC::Record object

2011-01-10 Thread Leif Andersson
; return undef; } } sub EOF { # eof() $_[0]-{'eof'}; } sub FILENO {1} sub BINMODE {1} sub CLOSE {1} sub DESTROY {1} __END__ /code That's all folks, /Leif Leif Andersson, Systems Librarian Stockholm University Library Från: Doran, Michael D

Re: MARC blob to MARC::Record object

2011-01-07 Thread Leif Andersson
Hi Michael, this is how I - in principle - usually do it: use MARC::Record; ... my $record = MARC::Record-new_from_usmarc( $blob ); /Leif Leif Andersson, Systems librarian Stockholm University Library Från: Doran, Michael D [do...@uta.edu] Skickat: den

Re: Moose based Perl library for MARC records

2010-11-09 Thread Leif Andersson
Frédéric, Just out of curiosity - what was your main motivation for writing another MARC module? In what ways does your distribution differ from MARC::Record? /Leif

SV: MARC-perl: different versions yield different results

2010-10-13 Thread Leif Andersson
not sure my brute hack qualifies as a one. But for now I will leave that up to others to decide. /Leif Från: Galen Charlton [gmcha...@gmail.com] Skickat: den 12 oktober 2010 17:35 Till: Leif Andersson Kopia: Al; perl4lib@perl.org Ämne: Re: MARC-perl: different

Re: MARC-perl: different versions yield different results

2010-10-12 Thread Leif Andersson
( STDOUT, ':raw' ); #binmode STDOUT; my $record = $batch-next; print $record-as_usmarc; As a habit I use binmode FH; when I write records to file. It is not needed, but it keeps me from the temptation of doing any other assumptions about character encodings. /Leif Andersson Stockholm University

Re: MARC-perl: different versions yield different results

2010-10-12 Thread Leif Andersson
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 Andersson leif.anders...@sub.su.se wrote

Re: Stripping out Unicode combining characters (diacritics)

2008-05-06 Thread Leif Andersson
== Leif Andersson, Systems Librarian Stockholm University Library SE-106 91 Stockholm SWEDEN Phone : +46 8 162769 Mobile: +46 70 6904281 -Ursprungligt meddelande- Från: Doran, Michael D [mailto:[EMAIL PROTECTED] Skickat: den 6 maj 2008 04:13 Till: Mike Rylander

Re: Help for utf-8 output

2008-03-01 Thread Leif Andersson
in when doing IO. If you are updating your databases through one API or another you are probably OK! Leif == Leif Andersson, Systems Librarian Stockholm University Library SE-106 91 Stockholm SWEDEN Phone : +46 8 162769 Mobile: +46 70 6904281 -Ursprungligt

Re: passing parameters to function as variable

2007-08-17 Thread Leif Andersson
= MARC::Field-new('245', '', '', @a245); $field-replace_with($revised_245); Leif Andersson -Ursprungligt meddelande- Från: Merritt H Lennox [mailto:[EMAIL PROTECTED] Skickat: den 16 augusti 2007 20:35 Till: perl4lib@perl.org Ämne: passing parameters to function as variable Hi - I

MARC::Record and importing broken UTF8

2007-03-01 Thread Leif Andersson
== Leif Andersson, Systems Librarian Stockholm University Library SE-106 91 Stockholm SWEDEN Phone : +46 8 162769 Mobile: +46 70 6904281 -Ursprungligt meddelande- Från: Mike Rylander [mailto:[EMAIL PROTECTED] Skickat: den 26 januari 2007 02:35 Till: Public Open-ILS tech discussion; perl4lib

MARC::Charset and transcoding of MARC::Record objects

2006-09-22 Thread Leif Andersson
seem to recall someone on this list mentioning the path MARC Record (MARC8) - MARCXML (UTF8) - MARC Record (UTF8) This trip involves, I'd guess, MARC::File::XML in addition to MARC::Charset But I suspect there may be different approaches here. Leif == Leif

MARC::Record ordering of fields

2005-05-13 Thread Leif Andersson
interested in how others would address the same problem. Leif == Leif Andersson, Systems Librarian Stockholm University Library

Re: Sort with MARC::Record

2005-01-31 Thread Leif Andersson
This is one way to do it: #!/usr/local/bin/perl -w use strict; use MARC::Batch; # sort marc records on field 001 # usage: sort_marc.pl infil.mrc utfil.mrc my $batch = new MARC::Batch( 'USMARC', $ARGV[0] ); my @records = (); my @f001= (); my $idx = 0; while ( my $MARC = $batch-next

Return values from MARC::Record

2003-11-06 Thread Leif Andersson
methods on the object it is a valid record (so far). Leif == Leif Andersson, Systems Librarian Stockholm University Library SE-106 91 Stockholm SWEDEN Phone : +46 8 162769 Mobile: +46 70 6904281