Re: MARC::Record tests

2005-01-06 Thread Ed Summers
I'm thinking that the MicroLIF failure is due to line endings being
different on Mac versions  OS X. 

There is code in MARC::File::MicroLIF::_get_chunk that handles DOS
(\r\n) and Unix (\n) line endings, but not Mac (\r).

Does anyone know if \r is a legit line ending in MicroLIF?

//Ed


RE: MARC::Record tests

2005-01-06 Thread Bryan Baldus
There is code in MARC::File::MicroLIF::_get_chunk that handles DOS
(\r\n) and Unix (\n) line endings, but not Mac (\r).

This is true, and it seems to work. Unfortunately, it is not reached by the
test, since the test calls decode() directly, instead of going through
_next() or _get_chunk.

Perhaps the:
# for ease, make the newlines match this platform
$lifrec =~ s/[\x0a\x0d]+/\n/g if defined $lifrec;

in _next() should be moved (or added as duplicate code) to decode() just
between the lines:
my $marc = MARC::Record-new();
### $text =~ s/[\x0a\x0d]+/\n/g if defined $text;
my @lines = split( /\n/, $text );

Bryan Baldus
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://home.inwave.com/eija


Re: MARC::Record and UTF-8

2005-01-06 Thread Ron Davies
At 07:50 7/01/2005, [EMAIL PROTECTED] wrote:
Does anyone know of any work underway to adapt MARC::Record for utf-8
encoding ?
I will have a similar project in a few months' time, converting a whole 
bunch of processing from MARC-8 to UTF-8. I would be very happy to assist 
in testing or development of a UTF-8 capability for MARC::Record. Is the 
problem listed in rt.cpan.org (http://rt.cpan.org/NoAuth/Bug.html?id=3707) 
the only known issue?

Ron
Ron Davies
Information and documentation systems consultant
Av. Baden-Powell 1  Bte 2, 1200 Brussels, Belgium
Email:  ron(at)rondavies.be
Tel:+32 (0)2 770 33 51
GSM:+32 (0)484 502 393