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

(-)a/C4/Charset.pm (-1 / +1 lines)
Lines 560-566 sub _marc_marc8_to_utf8 { Link Here
560
                    # occurs, upgrade the string in place.  Moral of the story seems to be
560
                    # occurs, upgrade the string in place.  Moral of the story seems to be
561
                    # that pack("U", ...) is better than chr(...) if you need to guarantee
561
                    # that pack("U", ...) is better than chr(...) if you need to guarantee
562
                    # that the resulting string is UTF-8.
562
                    # that the resulting string is UTF-8.
563
                    utf8::upgrade($utf8sf);
563
                    $utf8sf = Encode::encode('UTF-8', $utf8sf);
564
                }
564
                }
565
                push @converted_subfields, $subfield->[0], $utf8sf;
565
                push @converted_subfields, $subfield->[0], $utf8sf;
566
            }
566
            }
(-)a/C4/Templates.pm (-1 / +1 lines)
Lines 128-134 sub output { Link Here
128
        }
128
        }
129
    }
129
    }
130
    my $data;
130
    my $data;
131
#    binmode( STDOUT, ":utf8" );
131
    binmode( STDOUT, ":utf8" );
132
    $template->process( $self->filename, $vars, \$data )
132
    $template->process( $self->filename, $vars, \$data )
133
      || die "Template process failed: ", $template->error();
133
      || die "Template process failed: ", $template->error();
134
    return $data;
134
    return $data;
(-)a/Koha/Template/Plugin/AuthorisedValues.pm (-2 / +3 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use Template::Plugin;
22
use Template::Plugin;
23
use base qw( Template::Plugin );
23
use base qw( Template::Plugin );
24
24
25
use Encode qw{encode decode};
25
use Encode qw{encode is_utf8};
26
26
27
use C4::Koha;
27
use C4::Koha;
28
28
Lines 40-46 The parameters are identical to those used by the subroutine C4::Koha::GetAuthor Link Here
40
40
41
sub GetByCode {
41
sub GetByCode {
42
    my ( $self, $category, $code, $opac ) = @_;
42
    my ( $self, $category, $code, $opac ) = @_;
43
    return encode( 'UTF-8', GetAuthorisedValueByCode( $category, $code, $opac ) );
43
    my $av = GetAuthorisedValueByCode( $category, $code, $opac );
44
    return $av;
44
}
45
}
45
46
46
sub Get {
47
sub Get {
(-)a/Koha/Template/Plugin/Branches.pm (-2 / +2 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Template::Plugin;
22
use Template::Plugin;
23
use base qw( Template::Plugin );
23
use base qw( Template::Plugin );
24
use Encode qw{encode decode};
24
use Encode qw{encode is_utf8};
25
25
26
use C4::Koha;
26
use C4::Koha;
27
use C4::Context;
27
use C4::Context;
Lines 33-39 sub GetName { Link Here
33
    my $sth   = C4::Context->dbh->prepare($query);
33
    my $sth   = C4::Context->dbh->prepare($query);
34
    $sth->execute($branchcode);
34
    $sth->execute($branchcode);
35
    my $b = $sth->fetchrow_hashref();
35
    my $b = $sth->fetchrow_hashref();
36
    return $b ? encode( 'UTF-8', $b->{'branchname'} ) : q{};
36
    return $b->{branchname};
37
}
37
}
38
38
39
sub GetLoggedInBranchcode {
39
sub GetLoggedInBranchcode {
(-)a/Koha/Template/Plugin/EncodeUTF8.pm (-1 / +1 lines)
Lines 25-31 use Encode qw{encode}; Link Here
25
25
26
sub filter {
26
sub filter {
27
    my ( $self, $value ) = @_;
27
    my ( $self, $value ) = @_;
28
    return encode( 'UTF-8', $value );
28
    return is_utf8( $value ) ? encode( 'UTF-8', $value ) : $value;
29
}
29
}
30
30
31
1;
31
1;
(-)a/Koha/Template/Plugin/ItemTypes.pm (-1 / +1 lines)
Lines 32-38 sub GetDescription { Link Here
32
    my $sth   = C4::Context->dbh->prepare($query);
32
    my $sth   = C4::Context->dbh->prepare($query);
33
    $sth->execute($itemtype);
33
    $sth->execute($itemtype);
34
    my $d = $sth->fetchrow_hashref();
34
    my $d = $sth->fetchrow_hashref();
35
    return encode( 'UTF-8', $d->{'description'} );
35
    return $d->{description}
36
36
37
}
37
}
38
38
(-)a/cataloguing/addbiblio.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use strict;
22
use strict;
23
#use warnings; FIXME - Bug 2505
23
#use warnings; FIXME - Bug 2505
24
use CGI;
24
use CGI q(-utf8);
25
use C4::Output;
25
use C4::Output;
26
use C4::Auth;
26
use C4::Auth;
27
use C4::Biblio;
27
use C4::Biblio;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-2 / +2 lines)
Lines 63-70 Link Here
63
        <p><label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
63
        <p><label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
64
                <option value="">Any</option>[% FOREACH categorie IN categories %]
64
                <option value="">Any</option>[% FOREACH categorie IN categories %]
65
                [% IF ( categorie.selected ) %]
65
                [% IF ( categorie.selected ) %]
66
                <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description |html_entity %]</option>[% ELSE %]
66
                <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description %]</option>[% ELSE %]
67
                <option value="[% categorie.categorycode %]">[% categorie.description |html_entity %]</option>[% END %]
67
                <option value="[% categorie.categorycode %]">[% categorie.description %]</option>[% END %]
68
                [% END %]</select></p>
68
                [% END %]</select></p>
69
      [% END %]
69
      [% END %]
70
  </div>
70
  </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc (-1 / +1 lines)
Lines 4-10 Link Here
4
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New patron <span class="caret"></span></button>
4
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New patron <span class="caret"></span></button>
5
            <ul class="dropdown-menu">
5
            <ul class="dropdown-menu">
6
                [% IF ( AddPatronLists_categorycode ) %]
6
                [% IF ( AddPatronLists_categorycode ) %]
7
                    [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;categorycode=[% categorie.categorycode %]">[% categorie.description | html_entity %]</a></li>[% END %]
7
                    [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;categorycode=[% categorie.categorycode %]">[% categorie.description %]</a></li>[% END %]
8
                [% ELSE %]
8
                [% ELSE %]
9
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=A">Adult patron</a></li>
9
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=A">Adult patron</a></li>
10
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=C">Child patron</a></li>
10
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=C">Child patron</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt (-4 / +3 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE EncodeUTF8 %]
4
3
5
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
6
5
Lines 40-50 Link Here
40
39
41
                            [% ELSIF error == "no_checkout" %]
40
                            [% ELSIF error == "no_checkout" %]
42
41
43
                                <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %]</a> ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> ) is not checked out to a patron.</p>
42
                                <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title %] [% item.biblioitem.subtitle %]</a> ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> ) is not checked out to a patron.</p>
44
43
45
                            [% ELSIF error == "too_many" %]
44
                            [% ELSIF error == "too_many" %]
46
45
47
                                <p>[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) has been renewed the maximum number of times by [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )</p>
46
                                <p>[% item.biblio.title %] [% item.biblioitem.subtitle %] ( [% item.barcode %] ) has been renewed the maximum number of times by [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )</p>
48
47
49
                                [% IF Koha.Preference('AllowRenewalLimitOverride') %]
48
                                [% IF Koha.Preference('AllowRenewalLimitOverride') %]
50
                                    <form method="post" action="/cgi-bin/koha/circ/renew.pl">
49
                                    <form method="post" action="/cgi-bin/koha/circ/renew.pl">
Lines 97-103 Link Here
97
                    <div class="dialog message">
96
                    <div class="dialog message">
98
                        <h3>Item renewed:</h3>
97
                        <h3>Item renewed:</h3>
99
                        <p>
98
                        <p>
100
                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %]</a>
99
                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title %] [% item.biblioitem.subtitle %]</a>
101
                            ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> )
100
                            ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> )
102
                            renewed for
101
                            renewed for
103
                            [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )
102
                            [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-1 / +1 lines)
Lines 128-134 function enableCheckboxActions(){ Link Here
128
          [% CASE %][% line.accounttype %]
128
          [% CASE %][% line.accounttype %]
129
        [%- END -%]
129
        [%- END -%]
130
        [%- IF line.description %], [% line.description %][% END %]
130
        [%- IF line.description %], [% line.description %][% END %]
131
        [% IF line.title %]([% line.title |html_entity %])[% END %]
131
        [% IF line.title %]([% line.title %])[% END %]
132
    </td>
132
    </td>
133
    <td><input type="text" name="payment_note_[% line.accountno %]" /></td>
133
    <td><input type="text" name="payment_note_[% line.accountno %]" /></td>
134
    <td>[% line.accounttype %]</td>
134
    <td>[% line.accounttype %]</td>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tt (-2 / +1 lines)
Lines 54-60 Link Here
54
                            [% CASE %][% ACCOUNT_LINE.accounttype %]
54
                            [% CASE %][% ACCOUNT_LINE.accounttype %]
55
                          [%- END -%]
55
                          [%- END -%]
56
                          [%- IF ACCOUNT_LINE.description %], [% ACCOUNT_LINE.description %][% END %]
56
                          [%- IF ACCOUNT_LINE.description %], [% ACCOUNT_LINE.description %][% END %]
57
                          [% IF line.title %]([% line.title |html_entity %])[% END %]
57
                          [% IF line.title %]([% line.title %])[% END %]
58
                        </td>
58
                        </td>
59
                        [% IF ( ACCOUNT_LINE.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% ACCOUNT_LINE.amount %]</td>
59
                        [% IF ( ACCOUNT_LINE.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% ACCOUNT_LINE.amount %]</td>
60
                        [% IF ( ACCOUNT_LINE.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% ACCOUNT_LINE.amountoutstanding %]</td>
60
                        [% IF ( ACCOUNT_LINE.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% ACCOUNT_LINE.amountoutstanding %]</td>
61
- 

Return to bug 11944