On Oct 21, 2005, at 9:37 AM, Sperr, Edwin wrote:
I've tried running my records through MARC::Charset, using the
formulation:

while (my $record = $batch->next()) {
        $cs->to_utf8($file->write( $record ));
}

Am I using MARC::Charset correctly?

Yeah, you're not using it correctly. At the moment there's no way to transform an entire MARC::Record object. If you want to convert the 245 $a for example you could:

    $field = $record->field('245');
    $a = $field->subfield('a');
    print $cs->to_utf8($a);

Not sure if that helps. I'm hoping to find some time to modernize MARC::Charset to get it using the latest mapping file from LoC, and to get MARC::File::XML using it where appropriate. If anyone is interested in helping out let me know.

//Ed

Reply via email to