--- trunk/parse_format.pm 2003/06/23 20:20:32 54 +++ trunk/parse_format.pm 2003/07/04 15:05:23 57 @@ -41,23 +41,27 @@ while ($format) { #print STDERR "\n#### $format"; 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"; + my $tmp = isis_sf($row,$1,$2,$i); + if ($tmp) { + if ($codepage) { + $tmp = $codepage->convert($tmp) || warn "row: ",$row->{mfn},", $1$2 '$tmp' can't convert"; + } + $display .= $prefix . $tmp; + $swish .= $tmp." "; +#print STDERR " == $tmp"; } $prefix = ""; # this might be our local scpeciality -- fields 10 and 11 # (as opposed to 010 and 011) so they are strictly listed # here } 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." "; + my $tmp = isis_sf($row,$1,undef,$i); + if ($tmp) { + if ($codepage) { + $tmp = $codepage->convert($tmp) || warn "row: ",$row->{mfn},", $1$2 '$tmp' can't convert"; + } + $display .= $prefix . $tmp; + $swish .= $tmp." "; } $prefix = ""; } elsif ($format =~ s/^mfn//i) { @@ -106,7 +110,9 @@ #print STDERR "--$1-> $format -[",length($format),"] "; if ($row->{$1}) { my $tmp = $row->{$1}; - $tmp = $codepage->convert($tmp) if ($codepage); + if ($codepage) { + $tmp = $codepage->convert($tmp) || warn "excel: $1 '$tmp' can't convert"; + } $display .= $prefix . $tmp; $swish .= $tmp." "; #print STDERR " == $tmp";