View | Details | Raw Unified | Return to bug 6554
Collapse All | Expand All

(-)a/C4/ItemType.pm (-2 / +2 lines)
Lines 81-87 sub all { Link Here
81
    for ( @{$dbh->selectall_arrayref(
81
    for ( @{$dbh->selectall_arrayref(
82
        "SELECT * FROM itemtypes ORDER BY description", { Slice => {} })} )
82
        "SELECT * FROM itemtypes ORDER BY description", { Slice => {} })} )
83
    {
83
    {
84
        utf8::encode($_->{description});
84
        utf8::upgrade($_->{description});
85
        push @itypes, $class->new($_);
85
        push @itypes, $class->new($_);
86
    }
86
    }
87
    return @itypes;
87
    return @itypes;
Lines 105-111 sub get { Link Here
105
        "SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype
105
        "SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype
106
    );
106
    );
107
    if ( $data->{description} ) {
107
    if ( $data->{description} ) {
108
        utf8::encode($data->{description});
108
        utf8::upgrade($data->{description});
109
    }
109
    }
110
    return $class->new($data);
110
    return $class->new($data);
111
}
111
}
(-)a/C4/Search.pm (-2 / +2 lines)
Lines 574-579 sub getRecords { Link Here
574
                            {
574
                            {
575
575
576
# Sanitize the link value : parenthesis, question and exclamation mark will cause errors with CCL
576
# Sanitize the link value : parenthesis, question and exclamation mark will cause errors with CCL
577
								utf8::decode($one_facet);
577
                                my $facet_link_value = $one_facet;
578
                                my $facet_link_value = $one_facet;
578
                                $facet_link_value =~ s/[()!?¡¿؟]/ /g;
579
                                $facet_link_value =~ s/[()!?¡¿؟]/ /g;
579
580
Lines 1205-1211 sub parseQuery { Link Here
1205
                $query .= " #$modifier";
1206
                $query .= " #$modifier";
1206
            }
1207
            }
1207
        }
1208
        }
1208
1209
        $query_desc = $query;
1209
        $query_desc = $query;
1210
        $query_desc =~ s/\s+/ /g;
1210
        $query_desc =~ s/\s+/ /g;
1211
        if ( C4::Context->preference("QueryWeightFields") ) {
1211
        if ( C4::Context->preference("QueryWeightFields") ) {
Lines 1251-1257 sub buildQuery { Link Here
1251
1251
1252
    my $query_desc;
1252
    my $query_desc;
1253
    ( $operators, $operands, $indexes, $limits, $sort_by, $scan, $lang, $query_desc) = parseQuery($operators, $operands, $indexes, $limits, $sort_by, $scan, $lang);
1253
    ( $operators, $operands, $indexes, $limits, $sort_by, $scan, $lang, $query_desc) = parseQuery($operators, $operands, $indexes, $limits, $sort_by, $scan, $lang);
1254
1255
    # dereference
1254
    # dereference
1256
    my @operators = $operators ? @$operators : ();
1255
    my @operators = $operators ? @$operators : ();
1257
    my @indexes   = $indexes   ? @$indexes   : ();
1256
    my @indexes   = $indexes   ? @$indexes   : ();
Lines 1606-1611 sub buildQuery { Link Here
1606
        warn "LIMIT DESC:" . $limit_desc;
1605
        warn "LIMIT DESC:" . $limit_desc;
1607
        warn "---------\nLeave buildQuery\n---------";
1606
        warn "---------\nLeave buildQuery\n---------";
1608
    }
1607
    }
1608
	utf8::decode($query_desc);
1609
    return (
1609
    return (
1610
        undef,              $query, $simple_query, $query_cgi,
1610
        undef,              $query, $simple_query, $query_cgi,
1611
        $query_desc,        $limit, $limit_cgi,    $limit_desc,
1611
        $query_desc,        $limit, $limit_cgi,    $limit_desc,
(-)a/C4/Templates.pm (-3 / +4 lines)
Lines 62-67 sub new { Link Here
62
    my $template = Template->new(
62
    my $template = Template->new(
63
        {   EVAL_PERL    => 1,
63
        {   EVAL_PERL    => 1,
64
            ABSOLUTE     => 1,
64
            ABSOLUTE     => 1,
65
			ENCODING => 'utf8',
65
            PLUGIN_BASE => 'Koha::Template::Plugin',
66
            PLUGIN_BASE => 'Koha::Template::Plugin',
66
            COMPILE_EXT => C4::Context->config('template_cache_dir')?'.ttc':'',
67
            COMPILE_EXT => C4::Context->config('template_cache_dir')?'.ttc':'',
67
            COMPILE_DIR => C4::Context->config('template_cache_dir')?C4::Context->config('template_cache_dir'):'',,
68
            COMPILE_DIR => C4::Context->config('template_cache_dir')?C4::Context->config('template_cache_dir'):'',,
Lines 124-130 sub output { Link Here
124
            utf8_hashref($vars->{$k});
125
            utf8_hashref($vars->{$k});
125
        }
126
        }
126
        else {
127
        else {
127
            utf8::encode($vars->{$k}) if utf8::is_utf8($vars->{$k});
128
			utf8::upgrade($vars->{$k}) if utf8::is_utf8($vars->{$k});
128
        }
129
        }
129
    }
130
    }
130
    my $data;
131
    my $data;
Lines 145-151 sub utf8_arrayref { Link Here
145
            utf8_hashref($element);
146
            utf8_hashref($element);
146
            next;
147
            next;
147
        }
148
        }
148
        utf8::encode($element) if utf8::is_utf8($element);
149
		utf8::upgrade($element) if utf8::is_utf8($element);
149
    }        
150
    }        
150
}         
151
}         
151
152
Lines 160-166 sub utf8_hashref { Link Here
160
            utf8_hashref($hashref->{$key});
161
            utf8_hashref($hashref->{$key});
161
            next;
162
            next;
162
        }
163
        }
163
        utf8::encode($hashref->{$key}) if utf8::is_utf8($hashref->{$key});
164
		utf8::upgrade($hashref->{$key}) if utf8::is_utf8($hashref->{$key});
164
    }
165
    }
165
}
166
}
166
        
167
        
(-)a/members/member.pl (+3 lines)
Lines 49-54 my ($template, $loggedinuser, $cookie) Link Here
49
my $theme = $input->param('theme') || "default";
49
my $theme = $input->param('theme') || "default";
50
50
51
my $patron = $input->Vars;
51
my $patron = $input->Vars;
52
my $tmp_member = $patron->{member};
53
utf8::decode($tmp_member);
54
$patron->{member} = $tmp_member;
52
foreach (keys %$patron){
55
foreach (keys %$patron){
53
	delete $$patron{$_} unless($$patron{$_});
56
	delete $$patron{$_} unless($$patron{$_});
54
}
57
}
(-)a/opac/opac-search.pl (-2 / +1 lines)
Lines 96-102 my $template_name; Link Here
96
my $template_type = 'basic';
96
my $template_type = 'basic';
97
my @params = $cgi->param("limit");
97
my @params = $cgi->param("limit");
98
98
99
100
my $format = $cgi->param("format") || '';
99
my $format = $cgi->param("format") || '';
101
my $build_grouped_results = C4::Context->preference('OPACGroupResults');
100
my $build_grouped_results = C4::Context->preference('OPACGroupResults');
102
if ($format =~ /(rss|atom|opensearchdescription)/) {
101
if ($format =~ /(rss|atom|opensearchdescription)/) {
Lines 395-400 $template->{VARS}->{querystring} = join(' ', @operands); Link Here
395
if ($operands[0] && !$operands[1]) {
394
if ($operands[0] && !$operands[1]) {
396
    my $ms_query = $operands[0];
395
    my $ms_query = $operands[0];
397
    $ms_query =~ s/ #\S+//;
396
    $ms_query =~ s/ #\S+//;
397
	utf8::decode($ms_query);
398
    $template->param(ms_value => $ms_query);
398
    $template->param(ms_value => $ms_query);
399
}
399
}
400
400
401
- 

Return to bug 6554