Print

Print


On 1/23/09 4:39 AM, "Brown, Alan" <[log in to unmask]> wrote:

>> Does anybody here know the difference between MARC21 and USMARC?
>> 
>> I am munging sets of MARC bibliographic data from a III catalog with
>> holdings data from the same. I am using MARC::Batch to read my bib'
>> data (with both strict and warnings turned off), insert 853 and 863
>> fields, and writing the data using the as_usmarc method. Therefore, I
>> think I am creating USMARC files. I can then use marcdump to... dump
>> the records. It returns 0 errors.
> 
> Eric, This isn't an encoding thing is it? I know that a number of III
> catalogues still encode their diacritics using the MARC8 version of
> USMARC. We have changed ours to Unicode now, but we did have an issue of
> the catalogue outputting unicode records that weren't tagged as such in
> the leader and so couldn't be identified as proper MARC21 (current
> version of USMARC). III have solved this with their latest release. This
> issue had me scratching my head with a lot of my MARC::Record scripts,
> but generally they failed quite spectacularly.


Actually, I believe I am suffering from a number of different types of
errors in my MARC data: 1) encoding issues (MARC8 versus UTF-8), 2)
syntactical errors (lack of periods, invalid choices of indicators, etc.),
3) incorrect data types (strings entered into fields denoted for integers,
etc.) Just about the only thing I haven't encountered are structural errors
such as invalid leader, and this doesn't even take into account possible
data entry errors (author is Franklin when Twain was entered).

Yes, I do have an encoding issue. All of my incoming records are in MARC8.
I'm not sure, but I think the Primo tool expects UTF-8. I can easily update
the encoding bit (change leader position 09 from blank to a), but this does
not change any actual encoding in the bibliographic section of my data.
Consequently, after updating the encoding bit and looping through my munged
data MARC::Record chokes on records with the following error where UTF-8 is
denoted but include MARC8 characters:

  utf8 "\xE8" does not map to Unicode at
  /usr/lib/perl5/5.8.8/i686-linux/Encode.pm line 166.

Upon looking at the raw MARC see the the offending record includes the word
Münich. What can I do to transform MARC8 data into UTF-8? What can I do to
trap the error above, and skip these invalid records?

-- 
Eric Lease Morgan
http://lists.clir.org/cgi-bin/wa?A3=ind0901&L=CODE4LIB&E=8bit&P=1004260&B=--&T=text%2Fplain;%20charset=iso-8859-1&header=1
lists.clir.org
CC-MAIN-2023-14
3707
application/http; msgtype=response
sha1:3DY62B7IZOTUWP7NQLN3LBYAG6L3ZXME
<urn:uuid:2c1d6f57-728d-495f-ad42-169e11825b52>
2023-03-22T10:18:32Z
66.175.211.245
text/html
sha1:WUTKHKIVOSCKFHFYGN4W54IOKCJU64DJ
<urn:uuid:c08aa84f-8e82-4270-b8ac-f8285abc2cf7>
http://lists.clir.org/cgi-bin/wa?A3=ind0901&L=CODE4LIB&E=8bit&P=1004260&B=--&T=text%2Fplain;%20charset=iso-8859-1&header=1
response
<urn:uuid:fa9d228d-2f90-49cf-a760-f7a85ab8ba03>
isPartOf: CC-MAIN-2023-14
publisher: Common Crawl
description: Wide crawl of the web for March/April 2023
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-196
software: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/