CROASCII (YUS|HRN) B1.002:1982
[crolist2marc] / crolist2marc.pl
index a233047..56a54f2 100755 (executable)
@@ -5,6 +5,7 @@ use autodie;
 
 use MARC::Record;
 use Data::Dump qw(dump);
+use utf8;
 
 my $data;
 
@@ -25,10 +26,13 @@ while(<$fh>) {
 
        $sfi =~ s/^\$// || die "can't fix subfield [$sfi]";
 
+       my $text = $textkey . $textres; # FIXME fix CAPITAL letters in $textkey
+       $text =~ tr/^~]}\|[{@`/ČčĆćĐ𩹮ž/; # CROASCII (YUS|HRN) B1.002:1982
+
        $data->{$idsl}->{$tag}->[ $tagno ]->[ 0 ] = $i1;
        $data->{$idsl}->{$tag}->[ $tagno ]->[ 1 ] = $i2;
        $data->{$idsl}->{$tag}->[ $tagno ]->[ ( $sfino * 2 ) + 2 ] = $sfi;
-       $data->{$idsl}->{$tag}->[ $tagno ]->[ ( $sfino * 2 ) + 3 ] = $textkey . $textres;
+       $data->{$idsl}->{$tag}->[ $tagno ]->[ ( $sfino * 2 ) + 3 ] = $text;
 
 #      last if $lines++ > 5000;
 }