Lines 23-29
use strict;
Link Here
|
23 |
use warnings; |
23 |
use warnings; |
24 |
use Carp; |
24 |
use Carp; |
25 |
|
25 |
|
26 |
use Encode qw( decode ); |
26 |
use Encode qw( decode is_utf8 ); |
27 |
use MARC::Record; |
27 |
use MARC::Record; |
28 |
use MARC::File::USMARC; |
28 |
use MARC::File::USMARC; |
29 |
use MARC::File::XML; |
29 |
use MARC::File::XML; |
Lines 2484-2494
sub TransformHtmlToMarc {
Link Here
|
2484 |
foreach my $param_name ( keys %$cgi_params ) { |
2484 |
foreach my $param_name ( keys %$cgi_params ) { |
2485 |
if ( $param_name =~ /^tag_/ ) { |
2485 |
if ( $param_name =~ /^tag_/ ) { |
2486 |
my $param_value = $cgi_params->{$param_name}; |
2486 |
my $param_value = $cgi_params->{$param_name}; |
2487 |
if ( $param_value = Encode::decode('UTF-8', $param_value) ) { |
2487 |
unless ( Encode::is_utf8( $param_value ) ) { |
2488 |
$cgi_params->{$param_name} = $param_value; |
2488 |
$cgi_params->{$param_name} = Encode::decode('UTF-8', $param_value ); |
2489 |
} |
2489 |
} |
2490 |
|
|
|
2491 |
# FIXME - need to do something if string is not valid UTF-8 |
2492 |
} |
2490 |
} |
2493 |
} |
2491 |
} |
2494 |
|
2492 |
|
2495 |
- |
|
|