On 1/31/06, Joshua Ferraro <[EMAIL PROTECTED]> wrote: > Great ... thanks Bryan. MARC::Record2.0RC1 fixed my probs. > > In case anyone's wondering why I asked, I just finished > version 0.01 of Open-ILS's [1] new Z39.50 Server. A bug > in MARC::Record 1.x was holding me back. > > The server's based on Index Data's excellent > Net::Z3950::SimpleServer [2]. It also uses MARC::Record to > convert MARCXML (which is how Open-ILS stores bib records) > to MARC21. > > The problem I was having with MARC::Record 1.x happened because > some of the MARC records in GPLS's data were encoded with > utf-8 outside the ascii range (at least I _think_ that was > the problem) and MARC::Record wasn't calculating the directory > offsets properly (again, I _think_).
That was exactly the problem. We've been working on (and hopefully are close to having Ed Summers bless, distribute, and then hand off the maintenance for) a new version of MARC::File::XML that uses Ed's shiny new MARC::Charset to convert from MARC-8 encoded binary MARC21 to UTF-8 encoded MARCXML. The problem arises when you try to go from XML back to MARC21 ... the currently distributed MARC::Record doesn't understand how to count bytes instead of characters (combining or otherwise) in UTF-8 encoded records (or MARC-8 encoded records with byte sequences that look like they could be UTF-8, for that matter). Thus, the leader and directory get messed up with incorrect offsets. While there is a fix for that in cvs, it's not yet released on CPAN. Here's to hoping the maintainers release a new version soon... ;) > > MARC::Record 2.0RC1 handled the data fine and no errors were > thrown by SimpleServer and my Z-client (Yaz) when I tested. > > So Kudos to whoever's responsible for the utf-8 support. > > [1] http://openils.org > [2] http://indexdata.dk/simpleserver > > Cheers, > > -- > Joshua Ferraro VENDOR SERVICES FOR OPEN-SOURCE SOFTWARE > President, Technology migration, training, maintenance, support > LibLime Featuring Koha Open-Source ILS > [EMAIL PROTECTED] |Full Demos at http://liblime.com/koha |1(888)KohaILS > > On Mon, Jan 30, 2006 at 11:19:54AM -0600, Bryan Baldus wrote: > > On Monday, January 30, 2006 11:04 AM, Joshua Ferraro wrote: > > > > >Hi there, > > > > > >I've heard there is a unicode-friendly version of MARC::Record, > > >just wondering whether it can be found in SourceForge or CPAN. > > > > It is in SourceForge [1]. I don't believe version 2 has been released to > > CPAN yet. > > > > [1] http://cvs.sourceforge.net/viewcvs.py/marcpm/marc-record/ > > > > I hope this helps, > > > > Bryan Baldus > > [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > http://home.inwave.com/eija > -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org
