Lines 26-31
use CGI qw ( -utf8 );
Link Here
|
26 |
use Carp; |
26 |
use Carp; |
27 |
use YAML::XS; |
27 |
use YAML::XS; |
28 |
use List::MoreUtils qw/uniq/; |
28 |
use List::MoreUtils qw/uniq/; |
|
|
29 |
use Encode; |
29 |
|
30 |
|
30 |
use C4::Context; |
31 |
use C4::Context; |
31 |
use C4::Auth; |
32 |
use C4::Auth; |
Lines 678-684
sub get_infos_syspref {
Link Here
|
678 |
my $syspref = C4::Context->preference($syspref_name); |
679 |
my $syspref = C4::Context->preference($syspref_name); |
679 |
$syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt |
680 |
$syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt |
680 |
my $yaml = eval { |
681 |
my $yaml = eval { |
681 |
YAML::XS::Load($syspref); |
682 |
YAML::XS::Load(Encode::encode_utf8($syspref)); |
682 |
}; |
683 |
}; |
683 |
if ( $@ ) { |
684 |
if ( $@ ) { |
684 |
warn "Unable to parse $syspref syspref : $@"; |
685 |
warn "Unable to parse $syspref syspref : $@"; |
Lines 724-730
sub get_infos_syspref_on_item {
Link Here
|
724 |
my $syspref = C4::Context->preference($syspref_name); |
725 |
my $syspref = C4::Context->preference($syspref_name); |
725 |
$syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt |
726 |
$syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt |
726 |
my $yaml = eval { |
727 |
my $yaml = eval { |
727 |
YAML::XS::Load($syspref); |
728 |
YAML::XS::Load(Encode::encode_utf8($syspref)); |
728 |
}; |
729 |
}; |
729 |
if ( $@ ) { |
730 |
if ( $@ ) { |
730 |
warn "Unable to parse $syspref syspref : $@"; |
731 |
warn "Unable to parse $syspref syspref : $@"; |