On Wed, Aug 1, 2012 at 12:47 AM, Shelley Doljack <sdolj...@stanford.edu>wrote:

> The problem was I wasn't telling perl to output UTF-8. Now that I added
> binmode(FILE, ':utf8') to my script, the problem is fixed. However, it
> sounds like once I set binmode to UTF-8 everything will be interpreted as
> such, even when the record is in MARC-8. Is that right? So this means that
> I can only use my script with a file of records where all of them are
> encoded in UTF-8. If I want to run the script against a file with all
> MARC-8 encoding, then I'd need to remove the binmode line.

Sometimes it's easier to use the yaz-marcdump utility for MARC-8 to UTF-8
conversion (it's much faster):
yaz-marcdump -f MARC-8 -t UTF-8 -o marc marc21.in >marc21.out


Best regards,
Saiful Amin
DRTC, Bangalore

Reply via email to