--- trunk/parse_format.pm 2003/02/23 06:50:55 23 +++ trunk/parse_format.pm 2003/03/23 01:14:59 46 @@ -6,9 +6,10 @@ use isis_sf; sub parse_format { - my $format = shift; - my $row = shift; + my $format = shift || die "parse_format must be called with format!"; + my $row = shift || die "parse_format must be called with row!"; my $i = shift || 0; # isis repeatable number + my $codepage = shift || die "parse_format must be called with codepage!"; my $out; my $out_swish; @@ -26,6 +27,7 @@ if ($format =~ s/^(\d\d\d)(\w?)//) { my $isis_tmp = isis_sf($row,$1,$2,$i); if ($isis_tmp) { + $isis_tmp = $codepage->convert($isis_tmp) if ($codepage); $display .= $prefix . $isis_tmp; $swish .= $isis_tmp." "; #print STDERR " == $isis_tmp"; @@ -37,6 +39,7 @@ } elsif ($format =~ s/^(1[01])//) { my $isis_tmp = isis_sf($row,$1,undef,$i); if ($isis_tmp) { + $isis_tmp = $codepage->convert($isis_tmp) if ($codepage); $display .= $prefix . $isis_tmp; $swish .= $isis_tmp." "; }